GitHub Flavored Markdown doesn't render CSS styles inside a HTML block #22728
-
Hey here,
However when GitHub rendered it, the
I wonder if there is a way to use CSS within a markdown file. If not, I’d like to know why. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hello @ZeroAurora, Unfortunately you cannot use CSS in GitHub markdown as it is a part of the sanitization process.
source: https://github.com/github/markup While CSS can’t be super malicious, one could create a number of nuisances with it, such as for example, an element that takes up the entire page and blocks user interaction. I admit it would be nice to use at least some styles for alignment and what not, but it’s understandable. In regards to centering, the
|
Beta Was this translation helpful? Give feedback.
Hello @ZeroAurora,
Unfortunately you cannot use CSS in GitHub markdown as it is a part of the sanitization process.
source: https://github.com/github/markup
While CSS can’t be super malicious, one could create a number of nuisances with it, such as for example, an element that takes up the entire page and blocks user interaction. I admit it would be nice to use at least some styles for alignment and what not, but it’s understandable.
In regards to centering, the
align
attribute is the only method that will work currently. Despite being depr…