S
S
Seraphim2019-02-24 13:21:39
css
Seraphim, 2019-02-24 13:21:39

How to load different style files for different platforms?

Hello! A couple of days ago I started to study BEM (a requirement for an internship) and came across in the documentation on the item "Separation of the project into platforms". If I understand correctly, the point is not to load large files with styles on all platforms, but only those necessary for a specific platform, but I didn’t understand how exactly they will be connected? Suppose, as a result of the work, we got the following files:
desktop.bundles/bundle/bundle.css, which contains

import "common.blocks/button/button.css";   /* Базовые CSS-правила */
import "desktop.blocks/button/button.css";  /* Особенности для настольных устройств */

mobile.bundles/bundle/bundle.css
import "common.blocks/button/button.css";   /* Базовые CSS-правила */
import "mobile.blocks/button/button.css";   /* Особенности для мобильных устройств */

So far, I can only imagine connecting them one by one, but you can shove everything into one file and connect only it.
Ps I apologize in advance for possible stupidity, I'm literally taking my first steps, and I took up BEM because of an internship (+ desire to learn new things)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alibek Kulseitov, 2019-02-24
@AlibekKulseitov

Where did you read this? I've been working with BEM for a long time, I definitely haven't come across something like this

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question