Skip to content

Instantly share code, notes, and snippets.

@SLIB53
Created March 29, 2021 00:39
Show Gist options
  • Save SLIB53/d4c34840c81251d1f018357d2d209d30 to your computer and use it in GitHub Desktop.
Save SLIB53/d4c34840c81251d1f018357d2d209d30 to your computer and use it in GitHub Desktop.
Ulysses theme using Helvetica Neue and small headers
//
// Handy
//
// Helvetica Neue
//
// Visit http://www.ulyssesapp.com/styles
// for full reference
//
$white = #ffffff
$cool-blue = #3875d7 // todo: replace with ayu
// ayu
$common-accent = #ff9940
$common-fg = #575f66
$common-bg = #fafafa
$syntax-func = #f2ae49
$syntax-entity = #399ee6
$syntax-string = #86b300
$syntax-constant = #a37acc
//
// Document & Layout Settings
//
document-settings {
page-inset-top: 25.4mm
page-inset-inner: 25.4mm
page-inset-bottom: 25.4mm
page-inset-outer: 25.4mm
two-sided: no
page-binding: left
footnote-enumeration: per-section
footnote-placement: end-of-page
footnote-style: decimal
}
//
// Default Typography
//
defaults {
font-family: "Helvetica Neue"
font-size: 11pt
font-color: $common-fg
background-color: $white
line-height: 16pt
margin-bottom: 12pt
text-alignment: left
hyphenation: yes
}
paragraph + heading-2 {
margin-top: 16pt
}
paragraph + heading-3 {
margin-top: 16pt
}
paragraph + heading-4 {
margin-top: 16pt
}
//
// Basic Non-Text-Area Page Layout
//
area-header {
content: none
top-spacing: 0mm
bottom-spacing: 0mm
}
area-footnotes {
font-size: 9pt
line-height: 12pt
top-spacing: 10mm
divider-length: 60mm
text-inset: 15pt
}
area-footer {
content: none
font-family: "Helvetica Neue"
font-size: 9pt
text-alignment: center
top-spacing: 5mm
bottom-spacing: 15mm
}
@code {
font-family: "Menlo"
font-weight: normal
font-slant: normal
}
//
// Headers
//
heading-all {
font-family: "Helvetica Neue"
line-height: 150%
keep-with-following: true
text-alignment: left
}
heading-1 {
style-title: "Heading 1"
font-size: 16pt
font-weight: bold
margin-bottom: 16pt
}
heading-2 {
style-title: "Heading 2"
font-size: 13pt
font-weight: bold
margin-bottom: 13pt
}
heading-3 {
style-title: "Heading 3"
font-size: 12pt
font-weight: bold
margin-bottom: 6pt
}
heading-4 {
style-title: "Heading 4"
font-size: 11pt
font-weight: bold
}
//
// Paragraph styles
//
paragraph {
style-title: "Paragraph"
}
paragraph-divider {
page-break: none
visibility: hidden
}
paragraph-figure {
margin-top: 12pt
margin-bottom: 12pt
text-alignment: center
}
paragraph + paragraph {
// Blank line above a paragraph,
// except for the first paragraph
margin-top: 12pt
}
//
// Block styles
//
block-all {
margin-top: 12pt
margin-bottom: 12pt
margin-left: 3em
margin-right: 3em
}
block-code : @code {
style-title: "Codeblock"
font-size: 9pt
font-color: $cool-blue
line-height: 13pt
margin-bottom: 18pt
}
block-code paragraph {
text-alignment: left
first-line-indent: 0pt
hyphenation: no
default-tab-interval: 6em
}
block-quote {
style-title: "Blockquote"
font-slant: italic
margin-left: 3em
}
block-raw {
visibility: hidden
}
block-comment {
visibility: hidden
}
//
// List styles
//
list-all {
margin-left: 0em
margin-top: 0pt
}
list-all list-all {
// No extra spacings between nested ordered and unordered lists
margin-top: 0pt
margin-bottom: 0pt
}
list-ordered {
// Simulates tab stop justified right
enumeration-format: "%d."
text-inset: 2.5em
}
list-ordered list-ordered {
// Simulates tab stop justified right
enumeration-format: "%*%d"
text-inset: 5em
}
list-ordered list-ordered list-ordered {
// Simulates tab stop justified right
enumeration-format: "%*.%d"
text-inset: 7.5em
}
list-unordered {
// Simulates tab stop justified right
enumeration-format: "·"
text-inset: 1em
margin-bottom: 12pt
}
//
// Inline styles
//
inline-strong {
style-title: "Strong"
font-weight: bold
font-color: $syntax-entity
}
inline-emphasis {
style-title: "Emphasis"
font-slant: italic
}
inline-mark {
style-title: "Mark"
background-color: $common-accent
}
inline-citation {
style-title: "Inline Cite"
font-slant: italic
}
inline-code : @code {
style-title: "Inline Code"
}
inline-link {
style-title: "Link"
font-color: $cool-blue
underline: single
underline-color: $cool-blue
}
inline-comment {
visibility: hidden
}
inline-delete {
visibility: hidden
}
inline-annotation {
background-color: $common-accent
}
inline-annotation:anchor {
background-color: $white
}
inline-raw {
visibility: hidden
}
//
// Ulysses specific stuff
// By default, we are hiding tags (##) etc.
//
ulysses-tag {
visibility: hidden
}
inline-link ulysses-tag {
visibility: hidden
}
list-all ulysses-tag {
visibility: hidden
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment