Skip to content

Commit 07768ed

Browse files
author
Divya Manian
committed
Updated visuallyHidden rule to make sure it overrides all other declarations. Thanks Jonathan Neal. Fixes #194
1 parent 43c3719 commit 07768ed

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

css/style.css

+12-4
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,18 @@ button { width: auto; overflow: visible; }
198198
.hidden { display: none; visibility: hidden; }
199199

200200
/* Hide only visually, but have it available for screenreaders
201-
www.webaim.org/techniques/css/invisiblecontent/ & j.mp/visuallyhidden */
202-
.visuallyhidden { position: absolute !important;
203-
clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
204-
clip: rect(1px, 1px, 1px, 1px); }
201+
www.webaim.org/techniques/css/invisiblecontent/ & j.mp/visuallyhidden
202+
Updated to ensure no other style overrides the styles defined in this rule */
203+
.visuallyHidden {
204+
border: 0 !important;
205+
clip: rect(0 0 0 0);
206+
height: 1px !important;
207+
margin: -1px !important;
208+
overflow: hidden !important;
209+
padding: 0 !important;
210+
position: absolute !important;
211+
width: 1px !important;
212+
}
205213

206214
/* Hide visually and from screenreaders, but maintain layout */
207215
.invisible { visibility: hidden; }

0 commit comments

Comments
 (0)