Would it be possible to create a css class/id that would add a value(say, padding for example) to another class’s same attrib value?
Let me try to put it down more clearly.
.someClass{
padding: 20px;
}
.thickenMe{
padding: 5px;
}
And when i apply these classes as follows,
<div class='someClass thickenMe'>
<!--planning to beef up this div-->
</div>
This div’s net padding should become 25px.
Would it be possible using css only? Its just a thought!
No. You need to use client-side scripting (i.e.
JavaScript) if you want to change attributes dynamically. Or, if you just want to define styles by compiling from some dynamic sources, try LESS or SASS.