Селектор CSS имеет одно и то же свойство с несколькими значениями. Может ли это вызвать проблемы с производительностью? ⇐ CSS
-
Anonymous
Селектор CSS имеет одно и то же свойство с несколькими значениями. Может ли это вызвать проблемы с производительностью?
I was bit curious about a question that come to mind, even though it is not standard/good practice to write coed in such a way.
What if a CSS selector has same property with multiple value for example
.selector { display: flex; justify-content: center; align-items: center; font-size: 1rem; padding-top: 15px; padding:10px 5px 10px 5px; margin-top: 10px; margin: 10px; } as you can se padding and margin both properties has been added multiple times
Can it create performance issues for a html page if we have multiple selectors like this in a big application ?
Thanks in advance for your suggestions and observations you provide here.
Источник: https://stackoverflow.com/questions/780 ... rmance-iss
I was bit curious about a question that come to mind, even though it is not standard/good practice to write coed in such a way.
What if a CSS selector has same property with multiple value for example
.selector { display: flex; justify-content: center; align-items: center; font-size: 1rem; padding-top: 15px; padding:10px 5px 10px 5px; margin-top: 10px; margin: 10px; } as you can se padding and margin both properties has been added multiple times
Can it create performance issues for a html page if we have multiple selectors like this in a big application ?
Thanks in advance for your suggestions and observations you provide here.
Источник: https://stackoverflow.com/questions/780 ... rmance-iss
Мобильная версия