Code Execution Hierarchy (levels vs tags)


#1

I have a question. I am trying to make sense of how Jessie signed the hierarchy of the code to execute in TaskPaper. What I mean is, if I try putting levels as definitions of text, then the tags definition when applied to what is already defined in the levels version is not changed.

I would like to have it both ways if I could. I would like to assign text values in levels for say, notes, and then allow tags with special font styling to affect any line that contains that tag. In essence I want the tags styling to override the level style.

For Example:

item[data-type=note][depth=1]{
color: mix(black,blue, 40%);
font-family: Trebuchet MS;
line-height-multiple: 1.2;
font-size: 20;
paragraph-spacing-after: 3;
font-style: regular;
}
item[data-type=note][depth=2]{
color: mix(black,blue, 40%);
font-family: Trebuchet MS;
line-height-multiple: 1.2;
font-size: 20;
paragraph-spacing-after: 3;
font-style: regular;
}
item[data-type=note][depth=3]{
color: mix(black,blue, 40%);
font-family: Trebuchet MS;
line-height-multiple: 1.2;
font-size: 18;
paragraph-spacing-after: 3;
font-style: regular;
}

Is not affected by using this tag on any of the already defined levels of notes:

// Changes the text preceding the tag: "@focus"
item[data-focus] {
font-family: Trebuchet MS;
font-size: 23;
color: mix(black,green, 10%);
paragraph-spacing-before: 10;
paragraph-spacing-after: 0;
}

Whereas, if there was no level set, it would affect it. There seems to be no way to set up the levels and then add a tag for focus.

Also, if the code is incorrect in a named stylesheet, does TaskPaper default to the base-stylesheet?

Thanks.


#2

Out of curiosity β€” do you use the focus tag on projects ever, or just on notes?


#3

I use tags anywhere I need to associate project steps or - timely steps I have to take. With that said, no, I normally do not use tags with projects. That is primarily because of the the question I have posted here in this thread. My Projects show depth as shown in my OP. When I do this, tags do not seem to work. Setting up a depth level in TaskPaper seems to override the use of tags. Therefore I am not currently using depth in notes or in tasks. So in both notes and tasks, I use tags.

An example of using a tag to track it’s priority is @focus, @progress.
An example of associated tags is @al (American Legion), @va (VA).

ADDED:

I have more than one tag on a line as some of them are there to keep ideas associated such as @al but, they might also have a focus or other priority associated tag on the line.

Speaking of hierarchy, the less file appears to be read from the top to the bottom of the less file page. The lower tags in the less file override the previous tags - as far as formatting the text is concerned. In the following example, putting the focus tag definition after the progress tag definition means that if I have a progress and a focus tag on a line, the focus formatting is what will occur as the focus tag formatting is shown below the progress tag formatting.

If on the other hand, I placed the focus style tag definition in the less file above the progress tag, when progress and focus tags are on a single line, the progress tags style would affect the line.

Note that this has nothing to do with whether the progress tag is ahead of or after the focus tag on the actual line where it is used. This reading and using of the style of a tag is entirely less file hierarchically determined positioning.

For example, when using it this way in a less file, the @focus tag will override the @progress tag if both @focus and @progress are used for a single line:

// ----------------------------------------

// Changes the text preceding the tag: "@progress"
	item[data-progress] {
	color: mix(red,black, 50%);
	}
// ----------------------------------------

// Changes the text preceding the tag: "@focus"
	item[data-focus] {
	font-family: Trebuchet MS;
	font-size: 23;
	color: mix(blue, black, 60%);
	paragraph-spacing-before: 10;
	paragraph-spacing-after: 0;
	}
// ----------------------------------------

On the other hand, using it this way in a less file, the @progress tag will override the @focus tag if both @focus and @progress are used for a single line:
// ----------------------------------------

// Changes the text preceding the tag: "@focus"
	item[data-focus] {
	font-family: Trebuchet MS;
	font-size: 23;
	color: mix(blue, black, 60%);
	paragraph-spacing-before: 10;
	paragraph-spacing-after: 0;
	}
// ----------------------------------------

// Changes the text preceding the tag: "@progress"
	item[data-progress] {
	color: mix(red,black, 50%);
	}
// ----------------------------------------