WebDev:FrontendCodeStandards: Difference between revisions

Line 184: Line 184:
** Hide content for screen readers with position:absolute and position offscreen. Display:none hides content from screen readers.
** Hide content for screen readers with position:absolute and position offscreen. Display:none hides content from screen readers.
** Design layouts to stretch according to their contents (good for localization and good for font-resizing)
** Design layouts to stretch according to their contents (good for localization and good for font-resizing)
** Avoid selectors that are native element names (i.e. don't style on "div" or "p") except when resetting.
** Specify in comments the scope of generic sounding class names (what does .block mean and where is it applied? one page or multiple pages?)
*** Try avoiding generic class names altogether
** More?
** More?
* JS
* JS
6

edits