File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 1616 - [ ID Selectors] ( #id-selectors )
1717 - [ JavaScript hooks] ( #javascript-hooks )
1818 - [ Border] ( #border )
19+ - [ Inline Styles] ( #inline-styles )
20+ - [ Cross-Browser compatibility] ( #cross-browser-compatibility )
19211 . [ License] ( #license )
2022
2123## Terminology
@@ -226,6 +228,43 @@ Use `0` instead of `none` to specify that a style has no border.
226228```
227229** [ ⬆ back to top] ( #table-of-contents ) **
228230
231+ ## Inline Styles
232+ Avoid at all cost using inline styling as it will stay out from the stylesheet standard and overwriting initial styles.
233+ Styles become harder to maintain and document.
234+
235+ ** Bad**
236+
237+ ``` html
238+ <div style =" color :#f00 ;float :left ;" >
239+ Lorem Ipsum
240+ </div >
241+ <div style =" color :#000 ;" >
242+ Foo Bar
243+ </div >
244+ <div style =" color :#f00 ;" >
245+ Dolores Amit
246+ </div >
247+ ```
248+
249+ ** Good**
250+
251+ ``` css
252+ .foo {
253+ color : #f00 ;
254+ }
255+ ```
256+
257+ ## Cross-Browser compatibility
258+ Ensure your styles work well on all browsers such as IE, Opera, Chrome, etc..
259+
260+ ``` css
261+ .foo {
262+ -moz-
263+ -webkit-
264+ -o-
265+ -ms-
266+ }
267+ ```
229268
230269## License
231270
You can’t perform that action at this time.
0 commit comments