Typefully

CSS Methodologies You Must Know - 1

Avatar

Share

Β β€’Β 

3 years ago

Β β€’Β 

View on X

πŸ”· 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
Avatar

Mrunay Uttarwar

@MrunayU

🌐 Front End Dev πŸ’» Transitioning into Web3 πŸš€ Content Creator πŸ“ Always learning and sharing my journey πŸ’» Let's connect and geek out!