I want to start using modular CSS, but it's hard for me to figure out how to implement it. I thought I could just use the bridge method where I have one in my HTML and then @import for each module. Although I like the simplicity of this method, I worry about the negative performance effects it has, since the @ import-ed import tables will load later and not necessarily in parallel. So I want to know if there are other popular methods for implementing modular CSS. I really don't want to make a few tags, because PageSpeed and Yslow complain about so many stylesheets (although I know that this is actually more efficient than @import). Ideally, I would like to combine the stylesheets into one on the server, so only every browser asks for one stylesheet.
Using the server side to assemble your “modules” into a single server-side style sheet is definitely recommended here. So there is some kind of cache on the server, so it doesn’t need to build for each request. Many technologies are available for this, but your message does not contain anything about your software stack.
Check out the Compass CSS Framework . It supports modular CSS through mixins and simplifies CSS by adding variables, arithmetic, and including style frames such as Blueprint .
, . - , , CSS-, . . CSS , ? , .
. , 5 / ( )... , , , . , . , , . , , . - ( ) -geek.
Source: https://habr.com/ru/post/1770827/More articles:Calling a function from a function pointer in Delphi - multithreadingcorrect idiom for character string (not std :: string) constants in C ++ - c ++Bash: Finally (Exclude) Exception - bashMerge of two mp3 players - httpЭффект обрезки дерева решений - artificial-intelligenceRecommend a web service that processes a location within a certain radius? - phpTest-based development for SQL code - tddArtificial Intelligence and Chat Filters - filterCan I make R # intellisense select the first item in a list? - resharperHow long does the new indicator appear next to a SharePoint 2010 task? - sharepointAll Articles