Skip to content Skip to sidebar Skip to footer

How Can I Exclude One Html View In Whole Project To Be Applied From Css?

I am working on Cross Platform application on DevExtreme. It includes 8-10 number of CSS files to be applied on my project for all the html views. CSS are having so many background

Solution 1:

If your HTML is inheriting CSS files from index.xml file then its not possible to exclude from getting css applied to it. but on other hand you can add extra class to overwrite all the properties which are getting applied to your HTML snipet.

for Eg.

.myhtml{
  background: transparent !important;
}

there are different techniques of overwriting inherited css properties and for that you need to understand how css is getting applied on the basis of number of selectors in the rule. here is more description: https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Getting_started/Selectors

Also please check

CSS Specificity Examples

First count the element names. This can be either HTML elements or XML elements. For ease of distinguishing them, I will write them in all-caps.

* { ... } = 0 
P { ... } = 1 
DIV P { ... } = 2 
H3 + P { ... } = 2

Count classes, pseudo-classes and non-ID attributes and multiply by 10.

.top { ... } = 10 
P.top { ... } = 11 
a:link { ... } = 11 
a.new:link { ... } = 21 
H3.bottom + p.top { ... } = 22 
DIV + *[title] { ... } = 11

IDs are the most specific, so count them and multiply by 100.

#a1 { ... } = 100 #a1.red { ... } = 110 
H3#a1.red { ... } = 111 
blockquote #a2 { ... } = 101

Post a Comment for "How Can I Exclude One Html View In Whole Project To Be Applied From Css?"