Closed janriemer closed 8 years ago
Nice catch. LGTM
Awesome, thanks!
+1
Great catch, thanks for the PR.
Wow, that was fast! :rocket: You're welcome! :wink:
@marcustisater I think you guys should some how prerender the highlighted code. It would eliminate this case. And smaller JS bundle size.
I agree. It wasn't possible before. Not sure it is now.
@okonet I have no idea how to do it either. Maybe this would solve this issue ? https://github.com/MoOx/statinamic/issues/347
I think I know how to do this. A dead simple webpack loader will help. Do you guys accept a PR for this ?
poke @okonet
@thangngoc89 I'd like to see it but I'm not sure that having such complexity in the build step (special loader for code samples) is worth it. But I agree the size penalty of highlight.js is way too big for such a use case.
Also there is https://github.com/postcss/postcss.org/issues/167
The same case apply for midas too. It requires both PostCSS and Midas to render homepage (which needs to be fast). And I agree. It isn't worth it to write a loader just for this.
I agree. We need to refactor this, that's why we mentioned Midas before. PR is welcome, try combined it with #167
Before this change, when JavaScript is disabled, the font-color of elements with class
After:
![postcss-a11y-issue_after](https://cloud.githubusercontent.com/assets/8432168/14427042/de484f3c-fff2-11e5-8ed9-5f6a99f036a6.PNG)
highlight
was white on yellow background, which was hard to read. With this change it inherits parent color which is a black-ish color and therefore easier to read (see screenshots attached). Before: