Answer the question
In order to leave comments, you need to log in
Is it bad to use inline styles in the design of articles or news on the site?
Sometimes you want some news or articles to be placed on the site individually, the essence of the question is in the title, is it right or not. Constantly getting into css and adding new styles is a chore, and over time this will lead to a file size craze.
Answer the question
In order to leave comments, you need to log in
Judge for yourself, you will correct one block through inline styles, then another, then the third, and so on, and then you will need to make changes to several identical blocks at once.
It’s better to add one more class to css once, so that later it’s convenient to manage the whole thing than to suffer every time.
As for increasing the file, it doesn’t matter, there are various minifiers, the same grunt with its plugins does an excellent job of compressing everything and everywhere)
Inline styles are those that are described for each individual element in the style attribute , but it still seems to me that you do not need inline styles, but just individual styles for articles; several style rules, described not in the main style file, but either in a separate one or simply in the style block .
As the guy above tells you, judge for yourself: if you want to make the layout of the article unique - make the necessary classes, add them to individual styles for articles / pages. Everyone does it, it's convenient. It's not just that for every CMS there are a bunch of "individual CSS"/"page specific CSS" plugins.
Plus, it's just not necessary. There is no need to store individual styles in the main style file if you can separate them.
I respect other people's opinions, and no offense to Artyom Gribkov, I still want to say that the religious "I do not accept this" is nothing more than maximalism, for example, youthful. Not in theory, but in practice, individual styles are convenient.
UPD: I want to note that Artyom and those who liked his answer were a little confused by the fact that the author used the term inline , although he meant page specific .
If individually, then inline is quite normal, Artem Gribkov
does not agree with the opinion
. Why inflate the style file with styles that will be used once on one page.
I think the question concerns the design of articles by the content manager. My experience is this, I wrote a collection of auxiliary classes for content (what the built-in editor can't do) + made a visual guide for the content developer. Comfortable and does not stand out from the overall design. Allows you to implement 99% of the wishes))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question