With regard to my rather (overly-)complicated .visuallyhidden rule:
> /* hidden but available to speaking browsers */
> .visuallyhidden {
> overflow : hidden;
> position : absolute;
> clip : rect(0 0 0 0);
> height : 1px;
> width : 1px !important;
> margin : -1px;
> padding : 0;
> border : 0;
> }
I was re-reading Aaron Gustafson's ALA article Now You See Me
(http://alistapart.com/article/now-you-see-me). The article itself doesn't
mention my convoluted rule, but I did find mention of it (or one very similar)
in the comments, here: http://alistapart.com/comments/now-you-see-me#330871 and
Aaron responds to it a few comments below
(http://alistapart.com/comments/now-you-see-me#330873) with a simplified
version that does away with all the !important declarations. His simplified
version is:
.visuallyhidden {
position: absolute;
clip: rect(1px 1px 1px 1px);
}
...which could be easily undone by
.visuallyhiddenOFF {
position: static;
clip: auto;
}
And I've just discovered now that clip is deprecated, so I should probably use
clip-path instead (with clip as a browser fallback?).
I do still worry, however, about mysterious edge cases that the additional
complexity of the original rule was presumably there to cover. Anybody have any
wisdom on that score?
--
Rick Lecoat
Designer. Coder. Writer. Curmudgeon.
______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/