“Element queries are a new way of thinking about responsive web design where the responsive conditions apply to elements on the page instead of the width or height of the browser.
Unlike CSS @media queries, @element Queries are aware of more than just the width and height of the browser, you can write responsive conditions for a number of different situations like how many characters of text or child elements an element contains.
I almost completely switched to Sass in the past year. So organzing my CSS code has become a mission of mine :)
Structure is especially needed, when you are not the only one working on the design. So that everyone on the team can easily understand and contribute with ease. There are never too many files, as files get combined anyway.
Make your own life easier and for those you work with!
Currently applying the following structure on newer projects:
||–_typography.scss# Typography rules
||–_variables.scss# Sass Variables
||–_functions.scss# Sass Functions
||–_mixins.scss# Sass Mixins
||–_utils.scss# Class & placeholders helpers
||–_grid.scss# Grid system
||–_home.scss# Home specific styles
||–_about_us.scss# About us specific styles
||–_front_base.scss# Parent theme
||–_front_child.scss# Child theme
||–_admin.scss# Admin theme
||–_bourbon.scss# Bourbon Mixins
`–app.scss# primary Sass file
BASE holds files like resets, typography and foundation structures.
COMPONENTS holds specific module definitions, like buttons, navigation etc.
UTILS holds my own functions, mixins and configuration for the whole project.
LAYOUT holds the main files defining the different layout areas / grid of the project.
SECTIONS holds the definition of pages or sub sections defined.
THEMES holds files for theme switches or front / backend layouts.
VENDORS holds those files that are related to external includes.
Which architecture fits your project & team will vary.