Expanding on tag usage...
Posted: Thu Oct 04, 2007 6:14 am
Could you expand on where tags can be used and also types of tags....
I have several style sheets now for different modules and templates of the same site. There are some bits of the CSS that I would like to be common.
If I am writing any code I use definitions as macros instead of replicating magic numbers and strings throughout the body of the code. I would like to be able to define CSS tags for example font families. So my actually CSS would look somthing like:
body {
font-family: {MY_CSS_FONT_TAG};
}
Obviously there may be a problem immediately with the use of { }, so maybe use something else to delimite a CSS tag. I would then define in one place the tag.
This would make global changes to CSS very easy which would be so useful when trying out different looks, managing CSS could be so easy.
Infact, why not make it so you can write any text macro that is simply swapped out, so tags could be written to represent whole sections of CSS or just a single number if required.
eg.
MY_TD_TAG:
TD {
width: 80px;
text-align: left;
vertical-align: middle;
}
Then in my stylesheet:
{MY_TD_TAG}
This is then replaced with the appropriate content.
I have several style sheets now for different modules and templates of the same site. There are some bits of the CSS that I would like to be common.
If I am writing any code I use definitions as macros instead of replicating magic numbers and strings throughout the body of the code. I would like to be able to define CSS tags for example font families. So my actually CSS would look somthing like:
body {
font-family: {MY_CSS_FONT_TAG};
}
Obviously there may be a problem immediately with the use of { }, so maybe use something else to delimite a CSS tag. I would then define in one place the tag.
This would make global changes to CSS very easy which would be so useful when trying out different looks, managing CSS could be so easy.
Infact, why not make it so you can write any text macro that is simply swapped out, so tags could be written to represent whole sections of CSS or just a single number if required.
eg.
MY_TD_TAG:
TD {
width: 80px;
text-align: left;
vertical-align: middle;
}
Then in my stylesheet:
{MY_TD_TAG}
This is then replaced with the appropriate content.