Sorry for the stupid question, but how do I modify the CSS such that my headings are numbered? Eg. Level 1 heading is 1, level 2 heading is 1.1 etc.
you can try this.
~~~
/*
/*
// style the background color of the tree view
.tree-view {
// background-color: whitesmoke;
}
// style the background and foreground colors on the atom-text-editor-element itself
atom-text-editor {
// color: white;
// background-color: hsl(180, 24%, 12%);
}
// To style other content in the text editor's shadow DOM, use the ::shadow expression
atom-text-editor::shadow .cursor {
// border-color: red;
}
/*
// custom pdf output style
h1 {
counter-reset: h2counter;
}
h2 {
counter-increment: h2counter;
counter-reset: h3counter;
}
h3 {
counter-increment: h3counter;
counter-reset: h4counter;
}
h4 {
counter-increment: h4counter;
}
h2:before {
content: counter(h2counter) ". ";
}
h3:before {
content: counter(h2counter) "." counter(h3counter) ". ";
}
h4:before {
content: counter(h2counter) "." counter(h3counter) "." counter(h4counter) ". ";
}
@media print {
}
// custom phantomjs png/jpeg export style
&.phantomjs-image {
}
//custom phantomjs pdf export style
&.phantomjs-pdf {
}
// custom presentation style
.preview-slides .slide,
&[data-presentation-mode] {
// eg
// background-color: #000;
}
}
// please don't modify the .markdown-preview-enhanced section below
.markdown-preview-enhanced {
.markdown-preview-enhanced-custom() !important;
}
~~~
Thanks a lot, worked out just great!
Most helpful comment
you can try this.
~~~
/*
*
*
*/
/*
*/
// style the background color of the tree view
.tree-view {
// background-color: whitesmoke;
}
// style the background and foreground colors on the atom-text-editor-element itself
atom-text-editor {
// color: white;
// background-color: hsl(180, 24%, 12%);
}
// To style other content in the text editor's shadow DOM, use the ::shadow expression
atom-text-editor::shadow .cursor {
// border-color: red;
}
/*
*/
.markdown-preview-enhanced-custom {
// please write your custom style here
// eg:
// color: blue; // change font color
// font-size: 14px; // change font size
//
// custom pdf output style
h1 {
counter-reset: h2counter;
}
h2 {
counter-increment: h2counter;
counter-reset: h3counter;
}
h3 {
counter-increment: h3counter;
counter-reset: h4counter;
}
h4 {
counter-increment: h4counter;
}
h2:before {
content: counter(h2counter) ". ";
}
h3:before {
content: counter(h2counter) "." counter(h3counter) ". ";
}
h4:before {
content: counter(h2counter) "." counter(h3counter) "." counter(h4counter) ". ";
}
@media print {
}
// custom phantomjs png/jpeg export style
&.phantomjs-image {
}
//custom phantomjs pdf export style
&.phantomjs-pdf {
}
// custom presentation style
.preview-slides .slide,
&[data-presentation-mode] {
// eg
// background-color: #000;
}
}
// please don't modify the .markdown-preview-enhanced section below
.markdown-preview-enhanced {
.markdown-preview-enhanced-custom() !important;
}
~~~