π· CSS Methodologies You Must Know - 1
A Threadπ§΅ π
π In large, complicated, rapidly-iterated systems, CSS is notoriously difficult to maintain.
π The lack of a built-in scoping mechanism in CSS is one of the reasons.
π In CSS, everything is global.
π Until CSS gets its native scoping mechanism, we need to devise our own system for locking down styles to specific sections of an HTML document.
π CSS methodologies are the solution.
π Object-oriented CSS
β OOCSS concepts help us write components that are flexible, modular and interchangeable.
β For example, the style of your button elements might be set via two classes that you have given the class of:
β .button: Provides the button's basic structure.
β .grey-btn: Applies colors and other visual properties.
π Atomic CSS
β Atomic CSS is the approach to CSS architecture that favors small, single-purpose classes with names based on visual function.
β Example:
β Colors are set using hexadecimal values.
βAlpha transparency is created by appending the opacity value to the hex color.
π BEM
β Block Element Modifier is a methodology that helps you to create reusable components and code sharing in front-end development.
β The .loginform class is a block composed of three elements:
Thanks for reading this thread β€οΈ
If you like it , make sure you:
π· Like the tweet
π· Retweet the first tweet β‘
For more content , follow:
@MrunayU