Skip to content

Instantly share code, notes, and snippets.

@laosb
Last active February 18, 2023 17:45
Show Gist options
  • Save laosb/59ed4f1ac39d60bbb4cc94cfbabcce0b to your computer and use it in GitHub Desktop.
Save laosb/59ed4f1ac39d60bbb4cc94cfbabcce0b to your computer and use it in GitHub Desktop.
The minimal styles to use with Heti's add-on script, mainly for interscript spacing.
// https://github.com/sivan/heti/blob/master/lib/helpers/_inline.scss
heti-spacing {
display: inline;
& + sup,
& + sub {
margin-inline-start: 0;
}
}
.heti-spacing-start {
margin-inline-end: 0.25em;
}
.heti-spacing-end {
margin-inline-start: 0.25em;
}
heti-adjacent {
display: inline;
}
.heti-adjacent-half {
margin-inline-end: -0.5em;
}
.heti-adjacent-quarter {
margin-inline-end: -0.25em;
}
// https://github.com/sivan/heti/blob/master/lib/_inline.scss#L178-L195
// <a> tag is also added since on my blog links are also underlined.
.heti {
a,
abbr[title],
del,
ins,
s,
u {
margin-inline-start: 1px;
margin-inline-end: 1px;
}
}
heti-spacing{display:inline}heti-spacing+sup,heti-spacing+sub{margin-inline-start:0}.heti-spacing-start{margin-inline-end:.25em}.heti-spacing-end{margin-inline-start:.25em}heti-adjacent{display:inline}.heti-adjacent-half{margin-inline-end:-0.5em}.heti-adjacent-quarter{margin-inline-end:-0.25em}.heti a,.heti abbr[title],.heti del,.heti ins,.heti s,.heti u{margin-inline-start:1px;margin-inline-end:1px}
{
"sass": {
"compiler": "dart-sass/1.32.12",
"extensions": {},
"syntax": "SCSS",
"outputStyle": "compressed"
},
"autoprefixer": false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment