How To Override Unwanted CSS Styles
Last reviewed/updated: 21 Jul 2024 | Published: 05 Jul 2015 | Status: Active
1. Introduction
One technique for editing existing CSS styles is to edit the CSS source files directly. Another technique for editing existing CSS styles is to leave the CSS source files alone/intact, and to load additional CSS files, after the CSS source files, that override the existing CSS styles. The latter technique requires knowing how to override unwanted CSS styles.
2. How To Override Unwanted CSS Styles
Unwanted CSS Style Property | Override Unwanted CSS Style Property With Value | Note |
---|---|---|
background-color |
transparent |
|
border |
0 |
|
border-color |
currentColor |
|
border-radius |
0 |
|
border-style |
none |
|
border-width |
medium |
|
border-width |
0 |
|
box-shadow |
none |
|
box-sizing |
content-box |
|
font-size |
medium |
|
font-style |
normal |
|
font-weight |
normal |
|
letter-spacing |
normal |
|
line-height |
normal |
|
margin |
0 |
|
min-height |
0 |
|
min-width |
0 |
|
outline |
0 |
|
outline-color |
invert |
|
outline-style |
none |
|
outline-width |
medium |
|
outline-width |
0 |
|
padding |
0 |
|
text-transform |
none |
|
vertical-align |
baseline |
|
3. Resources And Additional Information
- Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification: W3C Recommendation 07 June 2011, Edited In Place 12 April 2016 To Point To New Work (w3.org) (Includes
min-height
,min-width
,line-height
,margin
,padding
, andvertical-align
.) - CSS Basic User Interface Module Level 3 (CSS3 UI): W3C Candidate Recommendation, 7 July 2015 (w3.org) (Includes
box-sizing
,outline
,outline-width
,outline-style
,outline-color
,outline-offset
,resize
,text-overflow
, andcursor
.) - CSS Backgrounds And Borders Module Level 3: W3C Candidate Recommendation 9 September 2014 (w3.org) (Includes
background-color
,background-image
,background-repeat
,background-attachment
,background-position
,background-clip
,background-origin
,background-size
,background
,border-color
,border-style
,border-width
,border
,border-radius
,border-image
, andbox-shadow
.) - CSS Fonts Module Level 3: W3C Candidate Recommendation 3 October 2013 (w3.org) (Includes
font-family
,font-weight
,font-stretch
,font-style
,font-size
,font-size-adjust
,font
, andfont-synthesis
.)