Less sheets recognize capitalization in tags


#1

Just a tip. I discovered something that others probably were already aware of, just to pass it on in case others are late to the plate like me. My less style sheet tags are capitalization dependent. That is, less will recognize capitalization in tags.

I use my style sheets for formatting quite a bit. I am a visual person and it helps when I create tags for styling a line in TaskPaper. What I mean by capitalization is that I can use capital B to reference the color BLUE and small b to reference bolding a line. Now that I know this, I have all my action style tags (bold, italic, etc.) lower case, and all my tags to set a color in caps (R, G, B, etc.)

For example, in the same less sheet I can use @b for bold text or, @B for blue text.

// -----------------------------------------
// Changes the text preceding the tag to bold: “@b
item[data-b] {
font-weight: bold;
}
// Changes the text of the tag “@b”.
run[tag=data-b] {
color: mix(black, white, 30%);
}
// -----------------------------------------

// Changes the text preceding the tag to BLUE: “@B
item[data-B] {
color: mix(green,blue, 50%);
}
// Changes the text of the tag “@B”.
run[tag=data-B] {
color: mix(black, white, 30%);
}
// -----------------------------------------