Posted automatically (#26594) by the SearchVoat.co Cross-Link Bot. You can suppress these notifications by appending a forward-slash(/) to your Voat link. More information here.
@Argosciv@srayzie, do you know if there is a way to highlight text in a different color to make it stand out from the rest of the text? In CSS? That would sure be handy!
Nah I tried some css options myself and then had a dig around. I'll explain with the following example:
Keeping in mind that basic text in a post/comment, when parsed, is encapsulated by <p></p> element tags & that there is currently no way for us(users) to assign attributes to these tags.
html:
<p id="this_can_be_targeted_by_css">This cannot be targeted by css.</p>
css for above:
#[id*='can_be_']{color: red;}
Result: (text would be colored red, because we targeted elements with an id attribute that contains 'can_be_')
This cannot be targeted by css.
In short, you can target an element based on the value(s) of its attribute(s), but not by any text within the element itself. Make sense?
In that case, highlighting headers can be useful, but at this time it's difficult to highlight phrases in 'normal' text blocks because there's nothing specific to target.
You could add css to look for phrases in a block of text but at best the css would apply to the entire block, not the target phrase(s).
css for highlighting all headers is easy now that every header gains a css id for use with making a TOC.
Basically what this is doing, is targeting any element with an id that starts with 'md-', but not the exact id md-section(because this is the id associated with blank h1 headers - which is how you make a light dotted line separator). This css adds a background and border, the background color is different for normal vs dark view.
As previously mentioned, you can apply some css to empty urls and then use that to 'highlight' select text within a block, however, this would be limited in that you cannot then highlight a working url; you would at best be able to highlight text on either side of a working url.
You'll be able to see that I've added css to the TOC links here, the css for which is as follows:
What this is doing, is targeting elements with an href containing '#md'-. I opted with contains rather than starts with so that TOC links that contain the full url of the submission(eg when posted in a comment) also receive the css.
LOL. Don't let this go to your head, now ;-) You've been doing so great at boiling things down to a pointed focus!
Very cool we can do this, now though.
If only we could Search comments, we'd truly be able to access our mountains of crowdsourced research on globalist corruption! That's where 90% of the good stuff is. As this latest dig shows so well. @SearchVoat any chance of this?
You would make a lot of citizen investigators in v/pizzagate, v/GreatAwakening and v/QRV VERY VERY stoked if you added this capability. I currently use Google, but they deindexed a bunch of v/pizzagate stuff, and it's hit or miss.
When using header formatting(#, ##, ###), you can create 'internal' links which will jump to that header.
To make a link, you can simply format the text as a url, but the 'url' part is merely a single #, followed immediately by "md-" then use the exact same text as the header(lowercased, replace any spaces with another "-"). For example:
Link:
[Section 1](#md-section-1)
Will scroll to header:
#Section 1
However!
When linking to a header in the main post or a top-level comment, the best practice is to provide the full url of the submission, along with the associated "#md-" extension.
For example, when you read this comment in your inbox or if you visit this comment specifically(or via 'context'), the simple url in the above example will not work:
SearchVoatBot ago
This submission was linked from this v/pizzagate comment by @Vindicator.
Posted automatically (#26594) by the SearchVoat.co Cross-Link Bot. You can suppress these notifications by appending a forward-slash(/) to your Voat link. More information here.
Vindicator ago
@Argosciv @srayzie, do you know if there is a way to highlight text in a different color to make it stand out from the rest of the text? In CSS? That would sure be handy!
argosciv ago
One thing you could do is modify the css of empty urls so that you can use that as a form of highlighting.
[I am an empty url]()
css:
[href='']{background-color: #666600;}
result:
I am an empty url
Vindicator ago
That would be excellent!
argosciv ago
(see parent comment) @PuttItOut thoughts on custom markup for highlighted text?
cc also: @srayzie
PuttItOut ago
I can probably add css classes to generated markdown.
srayzie ago
I don’t. I would love that. @Argosciv is an expert on formatting. He may find a way. If so, please ping me because I want to know too.
argosciv ago
Lololol enable custom CSS and check in here.
@Vindicator
Vindicator ago
I've got it enabled. I want to know how to highlight in yellow.
argosciv ago
Example of text you might like highlighted?
Vindicator ago
Key pizzagate related elements in the Laybourne stuff you've added -- like Kindercare. So it jumps right out at folks.
argosciv ago
Sorry, correction, it appears that you cannot target an element by searching the text itself for a phrase.
@srayzie
Vindicator ago
It seems like it would be possible, since the text changes color when it's made into an embedded hyperlink.
argosciv ago
Nah I tried some css options myself and then had a dig around. I'll explain with the following example:
Keeping in mind that basic text in a post/comment, when parsed, is encapsulated by <p></p> element tags & that there is currently no way for us(users) to assign attributes to these tags.
html:
css for above:
Result: (text would be colored red, because we targeted elements with an id attribute that contains 'can_be_')
This cannot be targeted by css.
In short, you can target an element based on the value(s) of its attribute(s), but not by any text within the element itself. Make sense?
@srayzie
Vindicator ago
I think so? O_o
srayzie ago
Thank you!
argosciv ago
In that case, highlighting headers can be useful, but at this time it's difficult to highlight phrases in 'normal' text blocks because there's nothing specific to target.
You could add css to look for phrases in a block of text but at best the css would apply to the entire block, not the target phrase(s).
css for highlighting all headers is easy now that every header gains a css id for use with making a TOC.
css in use here:
Basically what this is doing, is targeting any element with an id that starts with 'md-', but not the exact id md-section(because this is the id associated with blank h1 headers - which is how you make a light dotted line separator). This css adds a background and border, the background color is different for normal vs dark view.
As previously mentioned, you can apply some css to empty urls and then use that to 'highlight' select text within a block, however, this would be limited in that you cannot then highlight a working url; you would at best be able to highlight text on either side of a working url.
You'll be able to see that I've added css to the TOC links here, the css for which is as follows:
What this is doing, is targeting elements with an href containing '#md'-. I opted with contains rather than starts with so that TOC links that contain the full url of the submission(eg when posted in a comment) also receive the css.
@srayzie
srayzie ago
Thank you for letting me know
Vindicator ago
LOL. Don't let this go to your head, now ;-) You've been doing so great at boiling things down to a pointed focus!
Very cool we can do this, now though.
If only we could Search comments, we'd truly be able to access our mountains of crowdsourced research on globalist corruption! That's where 90% of the good stuff is. As this latest dig shows so well. @SearchVoat any chance of this?
SearchVoat ago
Yes, there is a chance. Can't really say more than that. Still fermenting the idea in the back of my mind and will probably try it at some point.
Vindicator ago
You would make a lot of citizen investigators in v/pizzagate, v/GreatAwakening and v/QRV VERY VERY stoked if you added this capability. I currently use Google, but they deindexed a bunch of v/pizzagate stuff, and it's hit or miss.
argosciv ago
Oh awesome!
I am excite.
argosciv ago
I think that's been discussed before. Ultimately, it would put a lot of strain on Voat or even SearchVoat.
If I'm not mistaken, this is one of the reasons we're now limited to viewing 20 pages worth of comments from profiles other than our own.
argosciv ago
Oh holy shit, it works...
Update: Oh my fucking god I love you Putt(and whoever else contributed to the TOC code)! You can anchor to top level comments!!!
@Vindicator @PuttItOut @srayzie @kevdude @PeaceSeeker
srayzie ago
What do you mean “anchor to top level comments”?
argosciv ago
See how there's a "Section X" link in the Table of Contents section at the top of the main post?
Clicking that will scroll down to the comment containing the "Section X" title.
srayzie ago
How do we do it?
Section X
But how?
argosciv ago
Okay so how it works is this:
When using header formatting(#, ##, ###), you can create 'internal' links which will jump to that header.
To make a link, you can simply format the text as a url, but the 'url' part is merely a single #, followed immediately by "md-" then use the exact same text as the header(lowercased, replace any spaces with another "-"). For example:
Link:
[Section 1](#md-section-1)
Will scroll to header:
#Section 1
However!
When linking to a header in the main post or a top-level comment, the best practice is to provide the full url of the submission, along with the associated "#md-" extension.
For example, when you read this comment in your inbox or if you visit this comment specifically(or via 'context'), the simple url in the above example will not work:
Section 1
But, if we change the above to:
[Section 1](https://voat.co/v/argosciv/3071688#md-section-1)
It will take us back to the main post, and scroll to "Section 1":
Section 1
Vindicator ago
Thanks for the ping, argo. This is cool!
srayzie ago
Thank you!!
argosciv ago
You're welcome :)
srayzie ago
Oh wow! Me and you are big into formatting. Perfect!
argosciv ago
Section X
Some text.
argosciv ago
Oh holy shit, it works...
@Vindicator @PuttItOut