Should CSS Override Default Browser Styles?

CSS overrides can change the default look of almost anything:


Should CSS Override Default Browser Styles? originally published on CSS-Tricks


This content originally appeared on CSS-Tricks and was authored by Chris Coyier

CSS overrides can change the default look of almost anything:

  • You can use CSS to override what a checkbox or radio button looks like, but if you don’t, the checkbox will look like a default checkbox on your operating system and some would say that’s best for accessibility and usability.
  • You can use CSS to override what a select menu looks like, but if you don’t, the select will look like a default select menu on your operating system and some would say that’s best for accessibility and usability.
  • You can override what anchor links look like, but some would say they should be blue with underlines because that is the default and it’s best for accessibility and usability.
  • You can override what scrollbars look like, but if you don’t, the scrollbars will look (and behave) the way default scrollbars do on your operating system, and some would say that’s best for accessibility and usability.

It just goes on and on…

Where do you draw the line?

In my experience, everyone has a different line. Nearly everybody styles their buttons. Nearly everybody styles their links, but some might only customize the hue of blue and leave the underline, drawing the line at more elaborate changes. It’s fairly popular to style form elements like checkboxes, radio buttons, and selects, but some people draw the line before that.

Some people draw a line saying you should never change a default cursor, some push that line back to make the cursor into a pointer for created interactive elements, some push that line so far they are OK with custom images as cursors. Some people draw the line with scrollbars saying they should never be customized, while some people implement elaborate designs.

CSS is a language for changing the design of websites. Every ruleset you write likely changes the defaults of something. The lines are relatively fuzzy, but I’d say there is nothing in CSS that should be outright banned from use — it’s more about the styling choices you make. So when you do choose to style something, it remains usable and accessible. Heck, background-color can be terribly abused making for inaccessible and unusable areas of a site, but nobody raises pitchforks over that.


Should CSS Override Default Browser Styles? originally published on CSS-Tricks


This content originally appeared on CSS-Tricks and was authored by Chris Coyier


Print Share Comment Cite Upload Translate Updates
APA

Chris Coyier | Sciencx (2022-01-04T19:50:18+00:00) Should CSS Override Default Browser Styles?. Retrieved from https://www.scien.cx/2022/01/04/should-css-override-default-browser-styles/

MLA
" » Should CSS Override Default Browser Styles?." Chris Coyier | Sciencx - Tuesday January 4, 2022, https://www.scien.cx/2022/01/04/should-css-override-default-browser-styles/
HARVARD
Chris Coyier | Sciencx Tuesday January 4, 2022 » Should CSS Override Default Browser Styles?., viewed ,<https://www.scien.cx/2022/01/04/should-css-override-default-browser-styles/>
VANCOUVER
Chris Coyier | Sciencx - » Should CSS Override Default Browser Styles?. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/01/04/should-css-override-default-browser-styles/
CHICAGO
" » Should CSS Override Default Browser Styles?." Chris Coyier | Sciencx - Accessed . https://www.scien.cx/2022/01/04/should-css-override-default-browser-styles/
IEEE
" » Should CSS Override Default Browser Styles?." Chris Coyier | Sciencx [Online]. Available: https://www.scien.cx/2022/01/04/should-css-override-default-browser-styles/. [Accessed: ]
rf:citation
» Should CSS Override Default Browser Styles? | Chris Coyier | Sciencx | https://www.scien.cx/2022/01/04/should-css-override-default-browser-styles/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.