-
-
Notifications
You must be signed in to change notification settings - Fork 79k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Reorganize Scss folder structure #28553
Comments
With the forms redux, I already want to move all that into a new subfolder. What other changes would you be interested in making? |
I guess a folder structure like this would be the result in the end:
In each folder some files could be grouped into folders if needed (like the form stuff). |
May I propose and a split on the variables.scss? It has being too big... Or Maybe One main File with the main variables and a second which will have all the inherited variables |
Splitting the |
I agree with @GeoSot, it would be handy to have two separate variable files, one for the initial variables and another for derived ones. It would save having to redeclare some variables such as colors as this is usually the file that is imported first in the SCSS setup. |
That will be awesome if V5 adopts ITCSS architecture. |
FWIW I got used to @hugogiraudel's 7-1 pattern which would be very consistent with our current namings:
Except for |
I think Magical Number helps Information Architecture. I like setting it to 3-4, but I don't think it must set maximum to 7. |
In fact it does, since it's not magical but describes the number of folders. You may think of And at least, this pattern has a name, is documented and pretty common. |
Punting to v6 for future discussion. |
Note that if the scss directory is put into a Hugo module/theme repo, "vendor" directories are omitted from that module when imported, which breaks the module. Currently, every time I update the copy of Bootstrap in my Hugo module, I have to manually patch it to rename the vendor directory to _vendor. It would be great if "vendor" directory names are avoided in the future. :) |
Our current
scss
file and folder architecture is a bit unclear. We have a_variables.scss
file on the same level as the components. There's also a_mixins.scss
file which includes the mixins in another folder. There might be some room for reorganisation.We could come up with our own folder structure but it might be interesting to have a look at existing solutions. Maybe ITCSS could help us out.
ITCSS has been discussed already in #18233 but this was also about splitting our variables file, I wouldn't do that for now. Just reorganising the files into folders would be a great start.
Feel free to spread your thoughts on this here
/CC @twbs/css-review
The text was updated successfully, but these errors were encountered: