I am using the @DisgruntledGoat method from here in order to place parenthesis around all of my ordered list types, with some relative and absolute positioning to make it look "normal". Everything is working completely as expected except my CSS selecting the proper type attribute.
I have this...
ol[type] {
counter-reset: list;
}
ol[type] li {
list-style: none;
position: relative;
}
ol[type="1"] > li:before {
counter-increment: list;
content: " (" counter(list, decimal) ") ";
position: absolute;
left: -1.4em;
}
ol[type="a"] > li:before {
counter-increment: list;
content: " (" counter(list, lower-alpha) ") ";
position: absolute;
left: -1.4em;
}
ol[type="A"] > li:before {
counter-increment: list;
content: " (" counter(list, upper-alpha) ") ";
position: absolute;
left: -1.4em;
}
My problem is that according to (EDIT: the W3C rules and ideas found on some sites) it seems the type="var" selector as HTML is infact not case-sensitive (which makes no sense to me, because "a" gives lower-alpha and "A" gives upper-alpha... well according to here anyway.
So far no matter what I try, all of my ol[type="a"] objects are getting selected and remade as upper-alpha by this line content: " (" counter(list, upper-alpha) ") "
. I need some help figuring out how to make sure my lower-alpha remain lower cased.
P.s. this is for a legal site with legal terms and they have informed me that they NEED lower case versus upper case distinctions.
EDIT:
I ended up using JQuery and added a class to each OL type within the DOM, one for number, one for lower-alpha and one for upper-alpha. Then it was easy to cover both the selection of each item as well as the :before
Pseudo selector, which I was thinking might be a problem originally.