question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Get rid of 'pre.language-*`

See original GitHub issue

We have a lot of CSS in the main bundle just for pre.language-*. In fact, look at the first 46 lines of https://gist.github.com/peterbe/735c93ff7b16eaefd463d36fb2a5147a which is a Prettier formatting of today’s main CSS bundle.

We don’t use class=language-* anywhere in the core Yari product. If you should be using class="brush: * instead.

The language-* is something you get from Markdown I think. Fenched code snippets with a block becomes <pre class="language-javascript"> or something like that.

However, we have a lot of cases where the language-* still comes up in our HTML. On https://developer.mozilla.org/en-US/docs/Learn/Accessibility/HTML for example, source has this:

<pre class="brush: html example-good line-numbers language-html">&lt;h1&gt;My heading&lt;/h1&gt;
&lt;p&gt;This is the first section of my document.&lt;/p&gt;
...

In this case, the language-html is actually preventing the example-good to work.

I think we should remove all the CSS that precludes to language-* from the SCSS. And any HTML that’s still in the raw HTML sources should get cleaned up.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
peterbecommented, Mar 24, 2021

Yeah, I see it now. It’s in /node_modules/prismjs/themes/prism.css I’ll investigate what if any new actually need from prism/themes/*.css and how it coincides with our own overrides.

0reactions
schalkneethlingcommented, Mar 24, 2021

@peterbe there is this one minimalist https://github.com/mdn/mdn-minimalist/blob/2198bb250990b847c5eccd81b505117b56a295f3/sass/atoms/_primsjs.scss

That is to override some colors in Prismjs to improve the a11y of the colors used. I doubt that is what you are referring to her so, perhaps all the CSS you are seeing comes directly from Prismjs’ stylesheet?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Talking Readiness (Pre-Language Skills) - Kid Sense Child ...
If your child has difficulties with getting ready to talk (pre-language) skills, it is recommended they consult a Speech Therapist. If there are...
Read more >
Sorting Out the 11 Prelinguistic Skills... - teachmetotalk.com
Receptive Language (which is closely tied to cognition) ... Now let's take the 11 Prelinguistic Skills from Let's Talk About Talking and ...
Read more >
9 Important Pre-Linguistic Skills for Children | Euro-Therapies
We've put together a short list explaining important pre-linguistic skills for children to develop. Our Metro Detroit speech-language ...
Read more >
Pre-language skills: Stepping stones to first words! - Tiny Talkers
Parents typically ask us about verbal communication, such as: how many words their child should be saying, how clear should their speech be,...
Read more >
What Are Pre Language Skills? | Pinnacle Blooms Network
PinnacleTV #PinnacleBloomsNetwork #PreLanguageSkillsPinnacle Blooms Network is probably first and only of its kind chain of child ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found