css-specificity Questions
1
I am attempting to use Flex-By-Default in the same manner as Facebook's CSS layout project. I am having some trouble when it comes to overriding the styles for display: inline-flex elements.
Per th...
Cecil asked 16/11, 2015 at 16:3
1
Solved
I'm having trouble understanding why my CSS isn't being styled according to the way I understand the specificity rules. According to my reading across the web (including this calculator), the * (ma...
Fruge asked 24/8, 2015 at 15:18
4
Solved
I am trying to revise for my exam on HTML, JavaScript and CSS3; and I am a little confused at CSS selectors and which take priority.
I have the following CSS:
table { border: 1px solid black; }
t...
Klopstock asked 15/6, 2015 at 19:47
3
Solved
I noticed with today's Chrome 40 update that justify-content does not seem to get properly overriden by subsequent style declarations.
See this fiddle for an example:
<div class="flex-parent"...
Antigua asked 23/1, 2015 at 11:41
6
Solved
Consider the following code
HTML:
<span class='c1'>Home<sup id='id1'>[2]</sup></span>
CSS:
.c1
{
text-decoration:underline;
}
#id1
{
text-decoration:none !important;
}
...
Rubious asked 18/8, 2011 at 20:10
1
Solved
The spec states regarding calculating CSS specificity: (bold mine)
Note: Repeated occurrences of the same simple selector are allowed and
do increase specificity.
So for example .class.class ...
Dogger asked 3/2, 2015 at 13:12
1
Solved
Bootstrap has a table {border-collapse: collapse; border-spacing:0;} style. I want to override this so I've create a class and applied it to the table in question:
table.FormGroupContainer
{
bord...
Knighton asked 30/9, 2014 at 16:6
2
Solved
Given two classes of equal specificity defining the color property I thought the last class listed in the element class attribute would take precedence.
From http://htmlhelp.com/reference/css/str...
Rupture asked 18/7, 2013 at 15:28
1
For some time now I'm using a little trick that I thought was smart.
That is combining the same css selector to add specificity to the rule's selector.
CSS Specs do mention :
Note: Repeated oc...
Glorification asked 29/8, 2014 at 9:58
1
Solved
I have the following css3 transition with ease effect:
HTML
<div class="button">
<a href="#" onMouseOver="clicksound.playclip()"></a>
<p id="myId" class="top"></p>...
Butz asked 11/2, 2014 at 14:47
2
Solved
Take a look at this jsfiddle: http://jsfiddle.net/ZNddz/
.intro:first-letter {
font-size: 130px;
}
span.letter {
background-color: red;
font-size: 30px;
}
p {
font-size: 80px;
}
The first ru...
Milli asked 1/10, 2013 at 13:52
4
Solved
I have a question about the priority of CSS classes after encountering a problem today. The situation is as follows:
I have an unordered list which has a class associated with it. The LI tags have...
Heinrick asked 13/7, 2009 at 15:31
1
I am working heavily in jQuery UI widgets and theming is becoming hard because of an oversight that I need to work around.
Consider this problem:
<div id="node" class="ui-wi...
Piezoelectricity asked 11/5, 2013 at 20:56
2
Solved
Greetings: I have spent days trying to find a tool that would display the exact CSS specificity number for each CSS rule as calculated by the browser. I have already looked at many online resources...
Britneybritni asked 25/4, 2013 at 23:48
2
Solved
I learned about selector precedence from this tutorial. I have trouble understanding the behavior of this in one case. I have an element in HTML:
<input class="top_bar_login_form_input"...
Doorman asked 2/2, 2013 at 21:13
4
Solved
Why in the following code world is blue rather than red?
The specificity of .my_class is 0,0,1,0, but it should inherit the color of #my_id whose specificity is higher at (0,1,0,0).
#my_id {
c...
Atbara asked 23/6, 2010 at 1:34
1
Solved
I was wondering what an efficient algorithm would be in the following scenario:
Given a parsed set of css rules, eg.
p.pStyle{margin-bottom:20px;font-family:Arial;}
p{font-family:Verdana;}
p.a...
Antisthenes asked 5/10, 2012 at 9:33
4
This is a long shot, but is there a tool available that optimizes CSS selectors by removing unneeded specificity?
I find that when I write CSS, I deliberately make my selectors more specific than ...
Penthea asked 7/8, 2012 at 7:26
3
Solved
According to the CSS docs:
http://www.w3.org/TR/CSS21/cascade.html#specificity
Specificity is defined by (amongst other things) the number of attributes and pseudo-classes in the selector.
So, my...
Watchmaker asked 20/7, 2012 at 2:34
4
Solved
Just wondering when you use multiple classes on the one element such as class="foo bar" and those classes are setup as below:
.foo {
margin-right: 10px;
}
.bar {
margin-right: 0px;
}
Which c...
Kymberlykymograph asked 9/12, 2011 at 20:48
1
Solved
My main goal is to try to reorder a CSS style block based on specificity. I previously had helped from SO and I managed to produce this function. See gist.
Here is an example:
function specifici...
Wynne asked 23/5, 2012 at 9:18
2
Solved
I have parsed a given CSS file/string into a JSON object like so:
{
"#header": {
"color": "#000000"
},
"#header h1": {
"color": "#000"
},
"h1": {
"color": "#4fb6e5"
}
}
What I want to d...
Ian asked 17/5, 2012 at 13:8
1
Solved
I'm redesigning my blog with responsive web design in mind, and the "mobile first" method - In short I'm trying to use min-width to avoid any kind of replication or css.. no display:none's etc..
M...
Diopside asked 24/4, 2012 at 22:1
3
Solved
I have two CSS rules following each other:
.some td:first-child:before {
content:url('path/to/image.png')" " ;
}
.some .other:before {
content:url('path/to/image2.png')" " ;
}
Here's the HTML ...
Feebleminded asked 7/4, 2012 at 15:56
1
Solved
Possible Duplicate:
Points in CSS specificity
Here's an example of what I mean:
http://jsfiddle.net/BTJXt/9/
Somehow 1 ID will beat a seemingly infinite number of classes. How is th...
Staffer asked 2/3, 2012 at 21:3
© 2022 - 2024 — McMap. All rights reserved.