About HTML in Community

Also some special formatting, specific to this community, to match block names (thanks @ewpatton ):

<span data-block="color">make color</span>
<span data-block="list">list from csv row</span>
<span data-block="math">decimal</span>
<span data-block="text">compare texts</span>
<span data-block="logic">true</span>
<span data-block="method">call Map1.PanTo</span>
<span data-block="variable">global counter</span>
<span data-block="control">for number in range</span>
<span data-block="dictionary">make a dictionary</span>
<span data-block="setter">setter</span>
<span data-block="getter">getter</span>

make color
list from csv row
decimal
compare texts
true
call Map1.PanTo
global counter
for number in range
make a dictionary
setter
getter

Use wisely and in the correct context....

and as you have found you can also use <mark>someText</mark> to highlight someText

7 Likes

I believe that the reason the style attribute is disallowed by Discourse is because one could use url values to track people and extract information about them. My first attempt at the styling pointed out by @TIMAI2 was with using the style attribute and I ran into this issue. Since the use of data attributes isn't forbidden, I overloaded those instead and applied some CSS tricks to make them useful.

2 Likes

Of interest, did you do "data block" for the light and dark green of property/label/textbox ?

2 Likes

You can use setter and getter, respectively.

2 Likes

Wait what ?????

Its just text formatting and not javascript, so how can one track someone ? I never learned that CSS is for performing actions. CSS doesn't even allow js statements to run in it.

1 Like

Hey I found another thing.

Notice the border around this.

Code :
<span data-block="not">Notice the border around this.</span>

How I found it.

While I was telling about the not logic property, I mistakenly wrote not in the attribute value instead of the  innerHTML .

This is how I found it.

I don't see any border??

1 Like

No, I ain't.

I can see the border even though I'm using Dark mode. Also the text has more white shade than normal.

When I switched to Light mode, I can't see any border.
Something weird.

What about this @ewpatton ?

But when I switched to the second Light mode,

The whole text became invisible. LOL :joy:.

Al last, I understood the concept of two Light modes. :joy:

I think the main expectation would be that people would use it correctly since doing so can help improve communication whereas using it incorrectly can make it harder for someone to understand what you're trying to say. Just not using it is more useful than purposefully misusing it.

3 Likes

[mod edit: tag removed - no need to tag a user in an open conversation with that user!]

I'm just using these <span> blocks to highlight blocks.

I used it here for other thing because I just wanted to show you all that this thing exists.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.