' -%}
+ {%- if site.mermaid.custom -%}
+
+ {%- else -%}
+
+ {%- endif %}
+
+{%- endif %}
diff --git a/_includes/common/metadata.liquid b/_includes/common/metadata.liquid
new file mode 100644
index 00000000..0bbd71e4
--- /dev/null
+++ b/_includes/common/metadata.liquid
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+{%- for meta in site.meta -%}
+
+{%- endfor -%}
+
+
diff --git a/_includes/common/opengraph.liquid b/_includes/common/opengraph.liquid
new file mode 100644
index 00000000..83c9839f
--- /dev/null
+++ b/_includes/common/opengraph.liquid
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/_includes/common/rest/content.liquid b/_includes/common/rest/content.liquid
new file mode 100644
index 00000000..5db6e269
--- /dev/null
+++ b/_includes/common/rest/content.liquid
@@ -0,0 +1,6 @@
+{%- assign content = content
+ | replace: "’", "'"
+ | replace: "“", '"'
+ | replace: "”", '"'
+ | replace: "
diff --git a/_includes/common/script.liquid b/_includes/common/script.liquid
new file mode 100644
index 00000000..c9f2ba98
--- /dev/null
+++ b/_includes/common/script.liquid
@@ -0,0 +1,11 @@
+
diff --git a/_includes/common/title.liquid b/_includes/common/title.liquid
new file mode 100644
index 00000000..ea0fcf09
--- /dev/null
+++ b/_includes/common/title.liquid
@@ -0,0 +1 @@
+{{ title }}
diff --git a/_includes/common/twitter_cards.liquid b/_includes/common/twitter_cards.liquid
new file mode 100644
index 00000000..89811429
--- /dev/null
+++ b/_includes/common/twitter_cards.liquid
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/_includes/coordinate.html b/_includes/coordinate.html
new file mode 100644
index 00000000..d433ec94
--- /dev/null
+++ b/_includes/coordinate.html
@@ -0,0 +1,201 @@
+
+
+In [1]:
+
+
+from arknights_mower.utils import config
+from arknights_mower.utils.solver import BaseSolver
+
+
+
+
+
+
+
+In [2]:
+
+
+config.ADB_DEVICE = ["127.0.0.1:5555"]
+solver = BaseSolver()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+In [3]:
+
+
+pos1 = (50, 30)
+pos2 = (80, 60)
+scope = (pos1, pos2)
+
+
+
+
+
+
+
+In [4]:
+
+
+solver.get_pos(scope)
+
+
+
+
+
+
+
+Out[4]:
+
+
+
+
+
+
+
+In [5]:
+
+
+solver.get_pos(scope, x_rate=0.2, y_rate=0.8)
+
+
+
+
+
+
+
+Out[5]:
+
+
+
+
+
+
+
+In [6]:
+
+
+from arknights_mower.utils.vector import va, vs, sa
+
+
+
+
+
+
+
+In [7]:
+
+
+va(pos1, pos2)
+
+
+
+
+
+
+
+Out[7]:
+
+
+
+
+
+
+
+In [8]:
+
+
+vs(pos1, pos2)
+
+
+
+
+
+
+
+Out[8]:
+
+
+
+
+
+
+
+In [9]:
+
+
+pos3 = (90, 40)
+sa(scope, pos3)
+
+
+
+
+
+
+
+Out[9]:
+
+
+
+
+
diff --git a/_includes/cropimg.html b/_includes/cropimg.html
new file mode 100644
index 00000000..1b25753e
--- /dev/null
+++ b/_includes/cropimg.html
@@ -0,0 +1,66 @@
+
+
+In [2]:
+
+
+from matplotlib import pyplot as plt
+
+from arknights_mower.utils.image import cropimg, loadimg
+
+
+
+
+
+
+
+In [3]:
+
+
+sc = loadimg("/home/zhao/Documents/mower-profile/screenshot/201/20240709094558.png")
+plt.imshow(sc)
+plt.show()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+In [4]:
+
+
+img = cropimg(sc, ((40, 60), (300, 200)))
+plt.imshow(img)
+plt.show()
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/_includes/extra/body.html b/_includes/extra/body.html
new file mode 100644
index 00000000..e69de29b
diff --git a/_includes/extra/head.html b/_includes/extra/head.html
new file mode 100644
index 00000000..e69de29b
diff --git a/_includes/extra/script.js b/_includes/extra/script.js
new file mode 100644
index 00000000..e69de29b
diff --git a/_includes/extra/styles.scss b/_includes/extra/styles.scss
new file mode 100644
index 00000000..e69de29b
diff --git a/_includes/list.liquid b/_includes/list.liquid
new file mode 100644
index 00000000..1a0be6f2
--- /dev/null
+++ b/_includes/list.liquid
@@ -0,0 +1 @@
+{%- include common/core/list.liquid -%}
diff --git a/_includes/rest/defaults.liquid b/_includes/rest/defaults.liquid
new file mode 100644
index 00000000..dce1b220
--- /dev/null
+++ b/_includes/rest/defaults.liquid
@@ -0,0 +1,2 @@
+{%- assign theme_alias = "rundocs/jekyll-rtd-theme@2.0.10" -%}
+{%- assign theme_color = "#2980b9" -%}
diff --git a/_includes/rest/script.liquid b/_includes/rest/script.liquid
new file mode 100644
index 00000000..d1ade181
--- /dev/null
+++ b/_includes/rest/script.liquid
@@ -0,0 +1,7 @@
+
+
+{%- if extra_script.size > 0 -%}
+
+{%- endif -%}
+
+
diff --git a/_includes/rest/styles.liquid b/_includes/rest/styles.liquid
new file mode 100644
index 00000000..ef9feed8
--- /dev/null
+++ b/_includes/rest/styles.liquid
@@ -0,0 +1,5 @@
+
+
+{%- if extra_scss.size > 0 -%}
+
+{%- endif -%}
diff --git a/_includes/shortcodes/danger.liquid b/_includes/shortcodes/danger.liquid
new file mode 100644
index 00000000..b7e0e42f
--- /dev/null
+++ b/_includes/shortcodes/danger.liquid
@@ -0,0 +1,9 @@
+
+
+
+ {{ __.danger | default: "Danger" }}
+
+
+ {{ codes | markdownify | strip_newlines -}}
+
+
diff --git a/_includes/shortcodes/mermaid.liquid b/_includes/shortcodes/mermaid.liquid
new file mode 100644
index 00000000..d3c0a801
--- /dev/null
+++ b/_includes/shortcodes/mermaid.liquid
@@ -0,0 +1,3 @@
+
+ {{ codes }}
+
diff --git a/_includes/shortcodes/note.liquid b/_includes/shortcodes/note.liquid
new file mode 100644
index 00000000..6055bc7d
--- /dev/null
+++ b/_includes/shortcodes/note.liquid
@@ -0,0 +1,9 @@
+
+
+
+ {{ __.note | default: "Note" }}
+
+
+ {{ codes | markdownify | strip_newlines -}}
+
+
diff --git a/_includes/shortcodes/tip.liquid b/_includes/shortcodes/tip.liquid
new file mode 100644
index 00000000..4afd0688
--- /dev/null
+++ b/_includes/shortcodes/tip.liquid
@@ -0,0 +1,9 @@
+
+
+
+ {{ __.tip | default: "Tip" }}
+
+
+ {{ codes | markdownify | strip_newlines -}}
+
+
diff --git a/_includes/shortcodes/warning.liquid b/_includes/shortcodes/warning.liquid
new file mode 100644
index 00000000..44226879
--- /dev/null
+++ b/_includes/shortcodes/warning.liquid
@@ -0,0 +1,9 @@
+
+
+
+ {{ __.warning | default: "Warning" }}
+
+
+ {{ codes | markdownify | strip_newlines -}}
+
+
diff --git a/_includes/templates/_toctree.liquid b/_includes/templates/_toctree.liquid
new file mode 100644
index 00000000..e3fc8dc2
--- /dev/null
+++ b/_includes/templates/_toctree.liquid
@@ -0,0 +1,41 @@
+{%- include common/rest/workdir.liquid %}
+
+{% comment %} display the directory name {% endcomment %}
+{%- assign dir = site_pages | where: "url", workdir | first -%}
+
+{%- if workdir_level == 2 %}
+ {% comment %} display the root sub-directory as "p.caption" {% endcomment %}
+
+ {{ dir.title | default: dir.url }}
+
+{%- else %}
+
+ {{ dir.title | default: dir.url }}
+
+{%- endif -%}
+
+
+ {% comment %} list file {% endcomment %}
+ {%- for item in workdir_files -%}
+ {%- assign level = item.dir | append: "temp" | replace_first: "/", "" | split: "/" | size | minus: 1 -%}
+ {%- capture current -%}
+ {%- if page.url == item.url %}current{% endif -%}
+ {%- endcapture %}
+
+ -
+
+ {%- if item.sort -%}
+ {{ item.sort }}. {{ item.title | default: item.name }}
+ {%- else -%}
+ {{ item.title | default: item.name }}
+ {%- endif -%}
+
+
+ {%- endfor -%}
+
+ {% comment %} list dirs {% endcomment %}
+ {%- for workdir in workdir_dirs -%}
+ {%- assign level = workdir | append: "temp" | replace_first: "/", "" | split: "/" | size | minus: 2 %}
+ - {% include templates/_toctree.liquid %}
+ {%- endfor -%}
+
diff --git a/_includes/templates/addons.liquid b/_includes/templates/addons.liquid
new file mode 100644
index 00000000..2c9d2346
--- /dev/null
+++ b/_includes/templates/addons.liquid
@@ -0,0 +1,43 @@
+
+
+
+ {{ site.title }}
+
+
+
+ {{ docs.source.branch }}
+
+
+
+
+
+
+ - {{ __.github | default: "GitHub" }}
+ -
+
+
+ {{ __.homepage | default: "Homepage" }}
+
+
+ -
+
+
+ {{ __.issues | default: "Issues" }}
+
+
+ -
+
+
+ {{ __.download | default: "Download" }}
+
+
+
+
+
+ This
+ Software
+ is under the terms of
+ {{ docs.license.name | default: "The Unlicense" }}.
+
+
+
diff --git a/_includes/templates/breadcrumbs.liquid b/_includes/templates/breadcrumbs.liquid
new file mode 100644
index 00000000..27231ed3
--- /dev/null
+++ b/_includes/templates/breadcrumbs.liquid
@@ -0,0 +1,33 @@
+
diff --git a/_includes/templates/content.liquid b/_includes/templates/content.liquid
new file mode 100644
index 00000000..87c568bf
--- /dev/null
+++ b/_includes/templates/content.liquid
@@ -0,0 +1,20 @@
+
+
+ {% include templates/breadcrumbs.liquid %}
+
+
+
+ {{ content }}
+
+
+ {% include templates/footer.liquid %}
+
+
diff --git a/_includes/templates/footer.liquid b/_includes/templates/footer.liquid
new file mode 100644
index 00000000..9656938f
--- /dev/null
+++ b/_includes/templates/footer.liquid
@@ -0,0 +1,50 @@
+{% comment %} prev and next {% endcomment %}
+{%- if page.url != "/search.html" and page.url != "/404.html" -%}
+ {%- if next or prev -%}
+
+ {%- endif -%}
+{%- endif -%}
+
+
+
+
+
+
+
+ {%- assign created_time = rest_created_at | date: "%Y" -%}
+ {%- assign updated_time = rest_updated_at | date: "%Y" -%}
+ {%- if created_time == updated_time -%}
+ {{- created_time -}},
+ {%- else -%}
+ {{- created_time }}-{{ updated_time -}},
+ {%- endif -%}
+
+
+ {{- author -}}
+
+ {% unless site.url contains "rundocs.io" %}
+
+
+ {% endunless %}
+
diff --git a/_includes/templates/sidebar.liquid b/_includes/templates/sidebar.liquid
new file mode 100644
index 00000000..131ad2c4
--- /dev/null
+++ b/_includes/templates/sidebar.liquid
@@ -0,0 +1,18 @@
+
diff --git a/_includes/templates/toctree.liquid b/_includes/templates/toctree.liquid
new file mode 100644
index 00000000..48513a25
--- /dev/null
+++ b/_includes/templates/toctree.liquid
@@ -0,0 +1,23 @@
+{%- include common/rest/workdir.liquid %}
+
+{% comment %} list the root files {% endcomment %}
+
+ {%- for item in workdir_files -%}
+ {%- assign level = item.dir | append: "temp" | replace_first: "/", "" | split: "/" | size -%}
+ {%- capture current -%}
+ {%- if page.url == item.url %}current{% endif -%}
+ {%- endcapture %}
+ -
+
+ {%- if item.sort -%}
+ {{ item.sort }}. {{ item.title | default: item.name }}
+ {%- else -%}
+ {{ item.title | default: item.name }}
+ {%- endif -%}
+
+
+ {%- endfor %}
+
+
+{% comment %} list the root dirs {% endcomment %}
+{%- for workdir in workdir_dirs %}{% include templates/_toctree.liquid %}{% endfor -%}
diff --git a/_layouts/default.liquid b/_layouts/default.liquid
new file mode 100644
index 00000000..4e7e211d
--- /dev/null
+++ b/_layouts/default.liquid
@@ -0,0 +1,32 @@
+---
+layout: tasks/compress
+---
+
+{%- include rest/defaults.liquid -%}
+{%- include common/rest/defaults.liquid -%}
+
+
+
+
+ {%- include common/metadata.liquid -%}
+ {%- include common/title.liquid -%}
+ {%- include common/twitter_cards.liquid -%}
+ {%- include common/opengraph.liquid -%}
+ {%- include common/schema.liquid -%}
+ {%- include common/links.liquid -%}
+ {%- include rest/styles.liquid -%}
+ {%- include common/script.liquid -%}
+ {%- include extra/head.html -%}
+
+
+ {%- include templates/sidebar.liquid -%}
+ {%- include templates/content.liquid -%}
+ {%- include templates/addons.liquid -%}
+ {%- include extra/body.html -%}
+ {%- include rest/script.liquid -%}
+ {%- include common/mermaid.liquid-%}
+ {%- include common/mathjax.liquid-%}
+ {%- include common/google_gtag.liquid-%}
+ {%- include common/google_adsense.liquid-%}
+
+
diff --git a/_layouts/tasks/compress.liquid b/_layouts/tasks/compress.liquid
new file mode 100644
index 00000000..c0c58d90
--- /dev/null
+++ b/_layouts/tasks/compress.liquid
@@ -0,0 +1,21 @@
+---
+layout: tasks/shortcodes
+---
+
+{%- if site.debug.compress == false -%}
+ {{ content }}
+{%- else -%}
+ {%- if content contains "" -%}
+ {%- assign pre_blocks = content_block | split: "
" -%}
+ {{ pre_blocks.last | split: " " | join: " " -}}
+ {%- else -%}
+ {{- content_block | split: " " | join: " " -}}
+ {%- endif -%}
+ {%- endfor -%}
+ {%- else -%}
+ {{- content | split: " " | join: " " -}}
+ {%- endif -%}
+{%- endif -%}
diff --git a/_layouts/tasks/shortcodes.liquid b/_layouts/tasks/shortcodes.liquid
new file mode 100644
index 00000000..4a0197d7
--- /dev/null
+++ b/_layouts/tasks/shortcodes.liquid
@@ -0,0 +1,33 @@
+{%- include common/rest/i18n.liquid -%}
+
+{%- assign shortcodes = "mermaid, warning, note, tip, danger" | split: ", " -%}
+
+{%- if site.debug.shortcodes == false -%}
+ {{ content }}
+{%- else -%}
+ {%- if content contains "" -%}
+ {%- assign pre_blocks = content_block | split: "
" -%}
+ {%- if content_block contains '> {% endcomment -%}
+ {%- assign custom = content_block | replace_first: '>', " " | split: " " -%}
+ {%- assign lang = custom.first -%}
+ {%- assign codes = custom.last | split: "
" | first -%}
+ {%- if shortcodes contains lang -%}
+ {%- include shortcodes/{{ lang }}.liquid -%} {{- pre_blocks.last -}}
+ {%- else -%}
+ {{ pre_blocks.last }}
+ {%- endif -%}
+ {%- else -%}
+ {{ pre_blocks.last -}}
+ {%- endif -%}
+ {%- else -%}
+ {{- content_block -}}
+ {%- endif -%}
+ {%- endfor -%}
+ {%- else -%}
+ {{- content -}}
+ {%- endif -%}
+{%- endif -%}
diff --git a/_sass/_direction.scss b/_sass/_direction.scss
new file mode 100644
index 00000000..28a1fdac
--- /dev/null
+++ b/_sass/_direction.scss
@@ -0,0 +1,107 @@
+html[dir="rtl"] {
+ // @primer/css/base/typography-base
+ ul,
+ ol {
+ padding-right: 0;
+ }
+
+ dd {
+ margin-right: 0;
+ }
+
+ // layout
+ .menu-sm {
+ left: unset;
+ right: -$theme-menu-width-sm;
+
+ &.shift {
+ left: unset;
+ right: 0;
+ }
+ }
+ .content-wrap {
+ &.shift {
+ left: unset;
+ right: $theme-menu-width-sm;
+ }
+ }
+
+ @include breakpoint(md) {
+ .menu-md {
+ left: unset;
+ right: 0;
+ }
+
+ .content-wrap {
+ margin-left: unset;
+ margin-right: $theme-menu-width;
+
+ &.shift {
+ left: unset;
+ right: 0;
+ }
+ }
+ }
+
+ // toctree
+ .toctree {
+ .fa {
+ margin-right: unset;
+ margin-left: 2px;
+ }
+ > ul {
+ // the first level links
+ > .toc > a {
+ padding-left: unset;
+ padding-right: $spacer-4 / 2;
+ }
+ }
+ }
+
+ // toc layout
+ .toc {
+ @for $level from 1 through 11 {
+ &.level-#{$level}.current {
+ > a {
+ padding-left: unset;
+ padding-right: $spacer-4 * ($level - 1 + 0.5);
+ }
+
+ .level-#{$level + 1} > a {
+ padding-left: unset;
+ padding-right: $spacer-4 * ($level + 0.5);
+ }
+ }
+ }
+ }
+ // markdown-body
+ .markdown-body {
+ .highlight {
+ direction: ltr;
+ }
+ blockquote {
+ border-left: none;
+ border-right: 0.25em $border-style lighten($gray-300, 5%);
+ }
+
+ ul,
+ ol {
+ padding-left: 0;
+ padding-right: 2em;
+ }
+
+ // improved checkbox
+ .task-list-item-checkbox {
+ margin-right: unset;
+ margin-left: 3px;
+ }
+ }
+
+ // font
+ .#{$fa-css-prefix}-arrow-circle-left:before {
+ content: $fa-var-arrow-circle-right;
+ }
+ .#{$fa-css-prefix}-arrow-circle-right:before {
+ content: $fa-var-arrow-circle-left;
+ }
+}
diff --git a/_sass/_font-face.scss b/_sass/_font-face.scss
new file mode 100644
index 00000000..0202e38e
--- /dev/null
+++ b/_sass/_font-face.scss
@@ -0,0 +1,66 @@
+@font-face {
+ font-family: "Lato";
+ font-weight: $font-weight-normal;
+ font-style: normal;
+ font-display: block;
+ src: url("fonts/lato-normal.woff2") format("woff2"),
+ url("fonts/lato-normal.woff") format("woff");
+}
+
+@font-face {
+ font-family: "Lato";
+ font-weight: $font-weight-normal;
+ font-style: italic;
+ font-display: block;
+ src: url("fonts/lato-normal-italic.woff2") format("woff2"),
+ url("fonts/lato-normal-italic.woff") format("woff");
+}
+
+@font-face {
+ font-family: "Lato";
+ font-weight: $font-weight-bold;
+ font-style: normal;
+ font-display: block;
+ src: url("fonts/lato-bold.woff2") format("woff2"),
+ url("fonts/lato-bold.woff") format("woff");
+}
+
+@font-face {
+ font-family: "Lato";
+ font-weight: $font-weight-bold;
+ font-style: italic;
+ font-display: block;
+ src: url("fonts/lato-bold-italic.woff2") format("woff2"),
+ url("fonts/lato-bold-italic.woff") format("woff");
+}
+
+@font-face {
+ font-family: "Roboto-Slab";
+ font-weight: $font-weight-normal;
+ font-style: normal;
+ font-display: block;
+ src: url("fonts/Roboto-Slab-Regular.woff2") format("woff2"),
+ url("fonts/Roboto-Slab-Regular.woff") format("woff");
+}
+
+@font-face {
+ font-family: "Roboto-Slab";
+ font-weight: $font-weight-bold;
+ font-style: normal;
+ font-display: block;
+ src: url("fonts/Roboto-Slab-Bold.woff2") format("woff2"),
+ url("fonts/Roboto-Slab-Bold.woff") format("woff");
+}
+
+@font-face {
+ font-family: "FontAwesome";
+ font-weight: normal;
+ font-style: normal;
+ font-display: block;
+ src: url("fonts/fontawesome-webfont.eot");
+ src: url("fonts/fontawesome-webfont.eot?#iefix") format("embedded-opentype"),
+ url("fonts/fontawesome-webfont.woff2") format("woff2"),
+ url("fonts/fontawesome-webfont.woff") format("woff"),
+ url("fonts/fontawesome-webfont.ttf") format("truetype"),
+ url("fonts/fontawesome-webfont.svg#fontawesomeregular") format("svg");
+}
diff --git a/_sass/_layout.scss b/_sass/_layout.scss
new file mode 100644
index 00000000..81644097
--- /dev/null
+++ b/_sass/_layout.scss
@@ -0,0 +1,76 @@
+.menu-sm {
+ position: fixed;
+ bottom: 0;
+ left: -$theme-menu-width-sm;
+ width: $theme-menu-width-sm;
+ max-height: 100%;
+
+ &.shift {
+ left: 0;
+ }
+}
+
+.sidebar-wrap {
+ top: 0;
+
+ @extend .menu-sm;
+
+ .sidebar > :last-child {
+ margin-bottom: 5em;
+ }
+}
+
+.addons-wrap {
+ @extend .menu-sm;
+}
+
+.content-wrap {
+ &.shift {
+ position: fixed;
+ top: 0;
+ bottom: 0;
+ left: $theme-menu-width-sm;
+ min-width: 100%;
+ }
+}
+
+@include breakpoint(md) {
+ .menu-md {
+ left: 0;
+ width: $theme-menu-width;
+ }
+
+ .sidebar-wrap {
+ @extend .menu-md;
+
+ .sidebar {
+ // 20px for scroll
+ width: $theme-menu-width + 20px;
+
+ .header,
+ .toctree {
+ width: $theme-menu-width;
+ }
+ }
+ }
+
+ .addons-wrap {
+ @extend .menu-md;
+ }
+
+ .content-wrap {
+ margin-left: $theme-menu-width;
+
+ &.shift {
+ position: relative;
+ left: 0;
+ min-width: 0;
+ }
+ }
+}
+
+@include breakpoint(xl) {
+ .content-wrap {
+ max-width: $width-xl - $theme-menu-width;
+ }
+}
diff --git a/_sass/_rest.scss b/_sass/_rest.scss
new file mode 100644
index 00000000..829c20c1
--- /dev/null
+++ b/_sass/_rest.scss
@@ -0,0 +1,26 @@
+// font
+.font-body {
+ font-family: $body-font;
+ font-weight: $font-weight-normal;
+}
+.font-head {
+ font-family: $head-font;
+ font-weight: $font-weight-bold;
+}
+.font-mono {
+ font-family: $mono-font;
+}
+
+.fa {
+ display: inline-block;
+ font: normal normal normal 14px/1 "FontAwesome";
+}
+
+.breadcrumb-item {
+ margin: 0;
+
+ &::after {
+ padding-right: 3px;
+ padding-left: 3px;
+ }
+}
diff --git a/_sass/_root.scss b/_sass/_root.scss
new file mode 100644
index 00000000..3bfd1ff6
--- /dev/null
+++ b/_sass/_root.scss
@@ -0,0 +1,9 @@
+:root {
+ @for $level from 1 through 12 {
+ @if $level % 4 == 0 {
+ --toc-#{$level}: #{darken($theme-white, 4 * 8.8%)};
+ } @else {
+ --toc-#{$level}: #{darken($theme-white, $level % 4 * 8.8%)};
+ }
+ }
+}
diff --git a/_sass/_variables.scss b/_sass/_variables.scss
new file mode 100644
index 00000000..2a92973f
--- /dev/null
+++ b/_sass/_variables.scss
@@ -0,0 +1,34 @@
+// fonts
+$body-font: "Lato", BlinkMacSystemFont, "Segoe UI", Helvetica, sans-serif;
+$head-font: "Roboto-Slab", sans-serif;
+$mono-font: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
+
+// theme color
+$theme-blue: #2980b9;
+$theme-red: #e74c3c;
+$theme-green: #1abc9c;
+$theme-orange: #e67e22;
+
+$theme-white: lighten($black, 99%);
+$theme-black: lighten($black, 15%);
+
+// theme link
+$theme-link: $blue;
+$theme-link-hover: lighten($blue, 10%);
+$theme-link-visited: lighten($purple, 10%);
+
+// theme code
+$theme-code: $theme-black;
+$theme-code-background: $bg-gray;
+$theme-code-inline: $theme-red;
+$theme-code-inline-background: darken($theme-white, 2%);
+
+// theme mask
+$theme-mask-white: transparentize($theme-white, 0.9);
+$theme-mask-black: transparentize($theme-black, 0.9);
+
+// theme menu
+$theme-menu-width-sm: 85%;
+$theme-menu-width: 300px;
+$theme-menu-background: darken($theme-black, 10%);
+$theme-menu-active-background: darken($theme-blue, 15%);
diff --git a/_sass/core/addons.scss b/_sass/core/addons.scss
new file mode 100644
index 00000000..4bd82047
--- /dev/null
+++ b/_sass/core/addons.scss
@@ -0,0 +1,39 @@
+.addons-wrap {
+ background-color: darken($theme-menu-background, 8%);
+
+ .status {
+ cursor: pointer;
+ background-color: darken($theme-menu-background, 5%);
+
+ .branch {
+ .fa {
+ color: $theme-white;
+ }
+
+ .name {
+ color: $green;
+ }
+ }
+ &:active {
+ background: $theme-menu-active-background;
+ }
+ }
+
+ .addons {
+ color: grey;
+
+ dl {
+ margin: 0;
+ }
+
+ dd {
+ display: inline-block;
+
+ a {
+ display: inline-block;
+ padding: 6px;
+ color: $theme-white;
+ }
+ }
+ }
+}
diff --git a/_sass/core/container.scss b/_sass/core/container.scss
new file mode 100644
index 00000000..4fb43491
--- /dev/null
+++ b/_sass/core/container.scss
@@ -0,0 +1,11 @@
+.container {
+ font-weight: $font-weight-normal;
+ color: $theme-black;
+ background: $theme-white;
+}
+
+@include breakpoint(xl) {
+ .container {
+ background: $theme-mask-black;
+ }
+}
diff --git a/_sass/core/content.scss b/_sass/core/content.scss
new file mode 100644
index 00000000..1bb18c9c
--- /dev/null
+++ b/_sass/core/content.scss
@@ -0,0 +1,4 @@
+.content-wrap {
+ font-size: $h4-size;
+ background: $theme-white;
+}
diff --git a/_sass/core/header.scss b/_sass/core/header.scss
new file mode 100644
index 00000000..2e16bc8d
--- /dev/null
+++ b/_sass/core/header.scss
@@ -0,0 +1,10 @@
+.header {
+ color: $theme-white;
+ background: $theme-blue;
+
+ input {
+ border-radius: 50px;
+ border: 1px solid #2472a4;
+ font-size: 80%;
+ }
+}
diff --git a/_sass/core/markdown.scss b/_sass/core/markdown.scss
new file mode 100644
index 00000000..8bd6c1ad
--- /dev/null
+++ b/_sass/core/markdown.scss
@@ -0,0 +1,113 @@
+.markdown-body {
+ .d-lang {
+ position: relative;
+
+ &:after {
+ position: absolute;
+ right: 0px;
+ top: 0px;
+ font-family: $mono-font;
+ font-size: $font-size-small;
+ content: attr(data-lang);
+ padding: 0 5px;
+ color: lighten($text-gray-light, 30%);
+ }
+ }
+
+ // 400
+ font-weight: $font-weight-normal;
+
+ a {
+ color: $theme-link;
+
+ &:hover {
+ color: $theme-link-hover;
+ }
+
+ code,
+ tt {
+ color: $theme-link;
+ }
+ }
+
+ h1,
+ h2,
+ h3,
+ h4,
+ h5,
+ h6,
+ dt {
+ font-family: $head-font;
+ }
+
+ table {
+ // 14px
+ font-size: $body-font-size;
+ }
+
+ // ruby highlight fixed, TODO: line number display
+ figure {
+ margin: 0;
+ }
+
+ .anchor {
+ // overwrite to right
+ float: none;
+ padding-right: 0;
+ margin-left: 3px;
+ // rtl
+ margin-right: 3px;
+ }
+
+ // improved
+ code,
+ tt {
+ font-size: $font-size-small;
+ border: $border;
+ color: $theme-code-inline;
+ background-color: $theme-code-inline-background;
+ }
+
+ pre {
+ > code {
+ color: $theme-code;
+ }
+ }
+
+ .highlight pre,
+ pre {
+ font-size: $font-size-small;
+ border: $border;
+ background-color: $theme-code-background;
+ }
+
+ div.highlighter-rouge {
+ @extend .d-lang;
+ }
+
+ // search
+ .search-results {
+ li {
+ list-style: none;
+ }
+ }
+
+ // improved checkbox
+ .task-list-item-checkbox {
+ margin-right: 3px;
+ }
+
+ // mermaid improved
+ .mermaid-wrap {
+ @extend .d-lang;
+ // mdl
+ @include shadow-2dp();
+
+ // .mermaid:not([data-processed="true"])
+ .mermaid {
+ font-size: $font-size-small;
+ font-family: $mono-font;
+ white-space: pre;
+ }
+ }
+}
diff --git a/_sass/core/sidebar.scss b/_sass/core/sidebar.scss
new file mode 100644
index 00000000..920a7d92
--- /dev/null
+++ b/_sass/core/sidebar.scss
@@ -0,0 +1,100 @@
+.sidebar {
+ color: $theme-white;
+ background: $theme-menu-background;
+
+ a {
+ text-decoration: none;
+ }
+
+ li {
+ list-style: none;
+ }
+ .version {
+ color: rgba(255, 255, 255, 0.3);
+ }
+}
+
+.toctree {
+ a {
+ color: $theme-white;
+ padding: 0.5em;
+ }
+
+ .caption {
+ color: lighten($theme-blue, 15%);
+ font-weight: $font-weight-bold;
+ line-height: 32px;
+ }
+
+ .fa {
+ margin-right: 2px;
+ }
+
+ > ul {
+ // the first level links
+ > .toc > a {
+ padding-left: $spacer-4 / 2;
+ }
+
+ // the first level links not current
+ > .toc:not(.current) > a {
+ &:hover {
+ background: $theme-mask-white;
+ }
+ &:active {
+ background: $theme-menu-active-background;
+ }
+ }
+
+ .toc.current {
+ // all expanded links
+ a {
+ color: #404040;
+
+ &:hover {
+ background: $theme-mask-white;
+ }
+ &.current {
+ font-weight: bold;
+ background: $theme-white;
+ border-top: 1px solid var(--toc-2);
+ border-bottom: 1px solid var(--toc-2);
+ }
+ }
+ // parent links
+ > a {
+ .fa-plus-square-o {
+ @extend .fa-minus-square-o;
+ }
+ }
+ }
+ // fixed level-1's hover mask
+ > .toc.current {
+ background: var(--toc-1);
+ }
+ }
+}
+
+// toc layout
+.toc {
+ > ul {
+ @extend .d-none;
+ }
+ @for $level from 1 through 11 {
+ &.level-#{$level}.current {
+ > a {
+ padding-left: $spacer-4 * ($level - 1 + 0.5);
+ background: var(--toc-#{$level});
+ }
+
+ > ul {
+ @extend .d-block;
+ background: var(--toc-#{$level + 1});
+ }
+
+ .level-#{$level + 1} > a {
+ padding-left: $spacer-4 * ($level + 0.5);
+ }
+ }
+ }
+}
diff --git a/_sass/core/title.scss b/_sass/core/title.scss
new file mode 100644
index 00000000..aebb87f5
--- /dev/null
+++ b/_sass/core/title.scss
@@ -0,0 +1,12 @@
+.title {
+ // 600
+ font-weight: $font-weight-bold;
+ color: $theme-white;
+
+ a {
+ color: $theme-white;
+ &:hover {
+ background: $theme-mask-white;
+ }
+ }
+}
diff --git a/_sass/core/toasts.scss b/_sass/core/toasts.scss
new file mode 100644
index 00000000..ac2c90b3
--- /dev/null
+++ b/_sass/core/toasts.scss
@@ -0,0 +1,53 @@
+.toasts {
+ // fixed note
+ font-size: $h4-size;
+ // mdl
+ @include shadow-2dp();
+
+ .title {
+ box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.14);
+ }
+
+ // fixed
+ .content {
+ :first-child {
+ margin-top: 0;
+ }
+
+ :last-child {
+ margin-bottom: 0;
+ }
+ }
+
+ &.note {
+ background-color: lighten($theme-blue, 50%);
+
+ .title {
+ background: lighten($theme-blue, 20%);
+ }
+ }
+
+ &.tip {
+ background-color: lighten($theme-green, 50%);
+
+ .title {
+ background: lighten($theme-green, 0%);
+ }
+ }
+
+ &.warning {
+ background-color: lighten($theme-orange, 40%);
+
+ .title {
+ background: lighten($theme-orange, 20%);
+ }
+ }
+
+ &.danger {
+ background-color: lighten($theme-red, 40%);
+
+ .title {
+ background: lighten($theme-red, 20%);
+ }
+ }
+}
diff --git a/_sass/lib/@primer/css/base/README.md b/_sass/lib/@primer/css/base/README.md
new file mode 100644
index 00000000..f8137632
--- /dev/null
+++ b/_sass/lib/@primer/css/base/README.md
@@ -0,0 +1,24 @@
+---
+bundle: "base"
+generated: true
+---
+
+# Primer CSS: `base` bundle
+
+## Usage
+
+Primer CSS source files are written in [SCSS]. To include this Primer CSS module in your own build, ensure that your `node_modules` directory is listed in your Sass include paths, then import it with:
+
+```scss
+@import "@primer/css/base/index.scss";
+```
+
+## Build
+
+The `@primer/css` npm package includes a standalone CSS build of this module in `dist/base.css`.
+
+## License
+
+[MIT](https://github.com/primer/css/blob/master/LICENSE) © [GitHub](https://github.com/)
+
+[scss]: https://sass-lang.com/documentation/syntax#scss
diff --git a/_sass/lib/@primer/css/base/base.scss b/_sass/lib/@primer/css/base/base.scss
new file mode 100644
index 00000000..c447d90c
--- /dev/null
+++ b/_sass/lib/@primer/css/base/base.scss
@@ -0,0 +1,90 @@
+// stylelint-disable selector-max-type
+* {
+ box-sizing: border-box;
+}
+
+input,
+select,
+textarea,
+button {
+ font-family: inherit;
+ font-size: inherit;
+ line-height: inherit;
+}
+
+body {
+ font-family: $body-font;
+ font-size: $body-font-size;
+ line-height: $body-line-height;
+ color: $text-gray-dark;
+ background-color: $bg-white;
+}
+
+a {
+ color: $text-blue;
+ text-decoration: none;
+
+ &:hover {
+ text-decoration: underline;
+ }
+}
+
+b,
+strong {
+ font-weight: $font-weight-bold;
+}
+
+// Horizontal lines
+//
+// TODO-MDO: Remove `.rule` from everywhere and replace with `
`s
+hr,
+.rule {
+ height: 0;
+ // stylelint-disable-next-line primer/spacing
+ margin: 15px 0;
+ overflow: hidden;
+ background: transparent;
+ border: 0;
+ // stylelint-disable-next-line primer/borders
+ border-bottom: $border-width $border-style lighten($gray-300, 5%);
+ @include clearfix();
+}
+
+//
+// Remove most spacing between table cells.
+//
+
+table {
+ border-spacing: 0;
+ border-collapse: collapse;
+}
+
+td,
+th {
+ padding: 0;
+}
+
+button {
+ cursor: pointer;
+ // Remove border radius added by Chrome macOS
+ border-radius: 0;
+}
+
+// increase the selector specificity for [hidden]
+// so that it always overrides utility classes (.d-block, etc.)
+[hidden][hidden] {
+ display: none !important;
+}
+
+details {
+ summary {
+ cursor: pointer;
+ }
+
+ &:not([open]) {
+ // Set details content hidden by default for browsers that don't do this
+ > *:not(summary) {
+ display: none !important;
+ }
+ }
+}
diff --git a/_sass/lib/@primer/css/base/index.scss b/_sass/lib/@primer/css/base/index.scss
new file mode 100644
index 00000000..2c7f8b99
--- /dev/null
+++ b/_sass/lib/@primer/css/base/index.scss
@@ -0,0 +1,6 @@
+@import "../support/index.scss";
+
+@import "./normalize.scss";
+@import "./base.scss";
+@import "./kbd.scss";
+@import "./typography-base.scss";
diff --git a/_sass/lib/@primer/css/base/kbd.scss b/_sass/lib/@primer/css/base/kbd.scss
new file mode 100644
index 00000000..7ee4503c
--- /dev/null
+++ b/_sass/lib/@primer/css/base/kbd.scss
@@ -0,0 +1,21 @@
+// Keyboard shortcuts
+// stylelint-disable selector-max-type
+
+kbd {
+ display: inline-block;
+ // stylelint-disable-next-line primer/spacing
+ padding: ($spacer-1 - 1) ($spacer-1 + 1);
+ font: 11px $mono-font;
+ // stylelint-disable-next-line primer/typography
+ line-height: 10px;
+ // stylelint-disable-next-line primer/colors
+ color: $gray-700;
+ vertical-align: middle;
+ background-color: $bg-gray-light;
+ // stylelint-disable-next-line primer/borders
+ border: $border-style $border-width $border-gray-dark;
+ border-bottom-color: $border-gray-dark;
+ border-radius: $border-radius;
+ // stylelint-disable-next-line primer/box-shadow
+ box-shadow: inset 0 -1px 0 $border-gray-dark;
+}
diff --git a/_sass/lib/@primer/css/base/normalize.scss b/_sass/lib/@primer/css/base/normalize.scss
new file mode 100644
index 00000000..7e8361d6
--- /dev/null
+++ b/_sass/lib/@primer/css/base/normalize.scss
@@ -0,0 +1,424 @@
+// stylelint-disable
+/*! normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */
+
+/**
+ * 1. Change the default font family in all browsers (opinionated).
+ * 2. Prevent adjustments of font size after orientation changes in IE and iOS.
+ */
+
+html {
+ font-family: sans-serif; /* 1 */
+ -ms-text-size-adjust: 100%; /* 2 */
+ -webkit-text-size-adjust: 100%; /* 2 */
+}
+
+/**
+ * Remove the margin in all browsers (opinionated).
+ */
+
+body {
+ margin: 0;
+}
+
+/* HTML5 display definitions
+ ========================================================================== */
+
+/**
+ * Add the correct display in IE 9-.
+ * 1. Add the correct display in Edge, IE, and Firefox.
+ * 2. Add the correct display in IE.
+ */
+
+article,
+aside,
+details, /* 1 */
+figcaption,
+figure,
+footer,
+header,
+main, /* 2 */
+menu,
+nav,
+section {
+ /* 1 */
+ display: block;
+}
+
+summary {
+ display: list-item;
+}
+
+/**
+ * Add the correct display in IE 9-.
+ */
+
+audio,
+canvas,
+progress,
+video {
+ display: inline-block;
+}
+
+/**
+ * Add the correct display in iOS 4-7.
+ */
+
+audio:not([controls]) {
+ display: none;
+ height: 0;
+}
+
+/**
+ * Add the correct vertical alignment in Chrome, Firefox, and Opera.
+ */
+
+progress {
+ vertical-align: baseline;
+}
+
+/**
+ * Add the correct display in IE 10-.
+ * 1. Add the correct display in IE.
+ */
+
+template, /* 1 */
+[hidden] {
+ display: none !important;
+}
+
+/* Links
+ ========================================================================== */
+
+/**
+ * Remove the gray background on active links in IE 10.
+ */
+
+a {
+ background-color: transparent; /* 1 */
+}
+
+/**
+ * Remove the outline on focused links when they are also active or hovered
+ * in all browsers (opinionated).
+ */
+
+a:active,
+a:hover {
+ outline-width: 0;
+}
+
+/* Text-level semantics
+ ========================================================================== */
+
+/**
+ * 1. Remove the bottom border in Firefox 39-.
+ * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
+ */
+
+abbr[title] {
+ border-bottom: none; /* 1 */
+ text-decoration: underline; /* 2 */
+ text-decoration: underline dotted; /* 2 */
+}
+
+/**
+ * Prevent the duplicate application of `bolder` by the next rule in Safari 6.
+ */
+
+b,
+strong {
+ font-weight: inherit;
+}
+
+/**
+ * Add the correct font weight in Chrome, Edge, and Safari.
+ */
+
+b,
+strong {
+ font-weight: bolder;
+}
+
+/**
+ * Add the correct font style in Android 4.3-.
+ */
+
+dfn {
+ font-style: italic;
+}
+
+/**
+ * Correct the font size and margin on `h1` elements within `section` and
+ * `article` contexts in Chrome, Firefox, and Safari.
+ */
+
+h1 {
+ font-size: 2em;
+ margin: 0.67em 0;
+}
+
+/**
+ * Add the correct background and color in IE 9-.
+ */
+
+mark {
+ background-color: #ff0;
+ color: $text-black;
+}
+
+/**
+ * Add the correct font size in all browsers.
+ */
+
+small {
+ font-size: 80%;
+}
+
+/**
+ * Prevent `sub` and `sup` elements from affecting the line height in
+ * all browsers.
+ */
+
+sub,
+sup {
+ font-size: 75%;
+ line-height: 0;
+ position: relative;
+ vertical-align: baseline;
+}
+
+sub {
+ bottom: -0.25em;
+}
+
+sup {
+ top: -0.5em;
+}
+
+/* Embedded content
+ ========================================================================== */
+
+/**
+ * Remove the border on images inside links in IE 10-.
+ */
+
+img {
+ border-style: none;
+}
+
+/**
+ * Hide the overflow in IE.
+ */
+
+svg:not(:root) {
+ overflow: hidden;
+}
+
+/* Grouping content
+ ========================================================================== */
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+code,
+kbd,
+pre,
+samp {
+ font-family: monospace, monospace; /* 1 */
+ font-size: 1em; /* 2 */
+}
+
+/**
+ * Add the correct margin in IE 8.
+ */
+
+figure {
+ margin: 1em $spacer-6;
+}
+
+/**
+ * 1. Add the correct box sizing in Firefox.
+ * 2. Show the overflow in Edge and IE.
+ */
+
+hr {
+ box-sizing: content-box; /* 1 */
+ height: 0; /* 1 */
+ overflow: visible; /* 2 */
+}
+
+/* Forms
+ ========================================================================== */
+
+/**
+ * 1. Change font properties to `inherit` in all browsers (opinionated).
+ * 2. Remove the margin in Firefox and Safari.
+ */
+
+button,
+input,
+select,
+textarea {
+ font: inherit; /* 1 */
+ margin: 0; /* 2 */
+}
+
+/**
+ * Restore the font weight unset by the previous rule.
+ */
+
+optgroup {
+ font-weight: $font-weight-bold;
+}
+
+/**
+ * Show the overflow in IE.
+ * 1. Show the overflow in Edge.
+ */
+
+button,
+input {
+ /* 1 */
+ overflow: visible;
+}
+
+/**
+ * Remove the inheritance of text transform in Edge, Firefox, and IE.
+ * 1. Remove the inheritance of text transform in Firefox.
+ */
+
+button,
+select {
+ /* 1 */
+ text-transform: none;
+}
+
+/**
+ * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
+ * controls in Android 4.
+ * 2. Correct the inability to style clickable types in iOS and Safari.
+ */
+
+button,
+html [type="button"], /* 1 */
+[type="reset"],
+[type="submit"] {
+ -webkit-appearance: button; /* 2 */
+}
+
+/**
+ * Remove the inner border and padding in Firefox.
+ */
+
+button::-moz-focus-inner,
+[type="button"]::-moz-focus-inner,
+[type="reset"]::-moz-focus-inner,
+[type="submit"]::-moz-focus-inner {
+ border-style: none;
+ padding: 0;
+}
+
+/**
+ * Restore the focus styles unset by the previous rule.
+ */
+
+button:-moz-focusring,
+[type="button"]:-moz-focusring,
+[type="reset"]:-moz-focusring,
+[type="submit"]:-moz-focusring {
+ outline: 1px dotted ButtonText;
+}
+
+/**
+ * Change the border, margin, and padding in all browsers (opinionated).
+ */
+
+fieldset {
+ border: $border-width $border-style #c0c0c0;
+ margin: 0 2px;
+ padding: 0.35em 0.625em $em-spacer-6;
+}
+
+/**
+ * 1. Correct the text wrapping in Edge and IE.
+ * 2. Correct the color inheritance from `fieldset` elements in IE.
+ * 3. Remove the padding so developers are not caught out when they zero out
+ * `fieldset` elements in all browsers.
+ */
+
+legend {
+ box-sizing: border-box; /* 1 */
+ color: inherit; /* 2 */
+ display: table; /* 1 */
+ max-width: 100%; /* 1 */
+ padding: 0; /* 3 */
+ white-space: normal; /* 1 */
+}
+
+/**
+ * Remove the default vertical scrollbar in IE.
+ */
+
+textarea {
+ overflow: auto;
+}
+
+/**
+ * 1. Add the correct box sizing in IE 10-.
+ * 2. Remove the padding in IE 10-.
+ */
+
+[type="checkbox"],
+[type="radio"] {
+ box-sizing: border-box; /* 1 */
+ padding: 0; /* 2 */
+}
+
+/**
+ * Correct the cursor style of increment and decrement buttons in Chrome.
+ */
+
+[type="number"]::-webkit-inner-spin-button,
+[type="number"]::-webkit-outer-spin-button {
+ height: auto;
+}
+
+/**
+ * 1. Correct the odd appearance in Chrome and Safari.
+ * 2. Correct the outline style in Safari.
+ */
+
+[type="search"] {
+ -webkit-appearance: textfield; /* 1 */
+ outline-offset: -2px; /* 2 */
+}
+
+/**
+ * Remove the inner padding and cancel buttons in Chrome and Safari on OS X.
+ */
+
+[type="search"]::-webkit-search-cancel-button,
+[type="search"]::-webkit-search-decoration {
+ -webkit-appearance: none;
+}
+
+/**
+ * Correct the text style of placeholders in Chrome, Edge, and Safari.
+ */
+
+::-webkit-input-placeholder {
+ color: inherit;
+ opacity: 0.54;
+}
+
+/**
+ * 1. Correct the inability to style clickable types in iOS and Safari.
+ * 2. Change font properties to `inherit` in Safari.
+ */
+
+::-webkit-file-upload-button {
+ -webkit-appearance: button; /* 1 */
+ font: inherit; /* 2 */
+}
diff --git a/_sass/lib/@primer/css/base/typography-base.scss b/_sass/lib/@primer/css/base/typography-base.scss
new file mode 100644
index 00000000..5894d042
--- /dev/null
+++ b/_sass/lib/@primer/css/base/typography-base.scss
@@ -0,0 +1,100 @@
+// Headings
+// --------------------------------------------------
+// stylelint-disable selector-max-type
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+
+h1 {
+ @include h1;
+}
+h2 {
+ @include h2;
+}
+h3 {
+ @include h3;
+}
+h4 {
+ @include h4;
+}
+h5 {
+ @include h5;
+}
+h6 {
+ @include h6;
+}
+
+// Body text
+// --------------------------------------------------
+
+p {
+ margin-top: 0;
+ // stylelint-disable-next-line primer/spacing
+ margin-bottom: 10px;
+}
+
+small {
+ // stylelint-disable-next-line primer/typography
+ font-size: 90%;
+}
+
+blockquote {
+ margin: 0;
+}
+
+// Lists
+// --------------------------------------------------
+
+ul,
+ol {
+ padding-left: 0;
+ margin-top: 0;
+ margin-bottom: 0;
+}
+
+ol ol,
+ul ol {
+ list-style-type: lower-roman;
+}
+
+ul ul ol,
+ul ol ol,
+ol ul ol,
+ol ol ol {
+ list-style-type: lower-alpha;
+}
+
+dd {
+ margin-left: 0;
+}
+
+// Code
+// --------------------------------------------------
+
+tt,
+code {
+ font-family: $mono-font;
+ font-size: $font-size-small;
+}
+
+pre {
+ margin-top: 0;
+ margin-bottom: 0;
+ font-family: $mono-font;
+ font-size: $font-size-small;
+}
+
+// Octicons
+// --------------------------------------------------
+
+// Move this over here as a temporary override to the octicons source repo
+// instead of updating that upstream.
+.octicon {
+ vertical-align: text-bottom;
+}
diff --git a/_sass/lib/@primer/css/breadcrumb/README.md b/_sass/lib/@primer/css/breadcrumb/README.md
new file mode 100644
index 00000000..8ff063b9
--- /dev/null
+++ b/_sass/lib/@primer/css/breadcrumb/README.md
@@ -0,0 +1,24 @@
+---
+bundle: "breadcrumb"
+generated: true
+---
+
+# Primer CSS: `breadcrumb` bundle
+
+## Usage
+
+Primer CSS source files are written in [SCSS]. To include this Primer CSS module in your own build, ensure that your `node_modules` directory is listed in your Sass include paths, then import it with:
+
+```scss
+@import "@primer/css/breadcrumb/index.scss";
+```
+
+## Build
+
+The `@primer/css` npm package includes a standalone CSS build of this module in `dist/breadcrumb.css`.
+
+## License
+
+[MIT](https://github.com/primer/css/blob/master/LICENSE) © [GitHub](https://github.com/)
+
+[scss]: https://sass-lang.com/documentation/syntax#scss
diff --git a/_sass/lib/@primer/css/breadcrumb/breadcrumb.scss b/_sass/lib/@primer/css/breadcrumb/breadcrumb.scss
new file mode 100644
index 00000000..af7155d2
--- /dev/null
+++ b/_sass/lib/@primer/css/breadcrumb/breadcrumb.scss
@@ -0,0 +1,28 @@
+.breadcrumb-item {
+ display: inline-block;
+ // stylelint-disable-next-line primer/spacing
+ margin-left: -0.35em;
+ white-space: nowrap;
+ list-style: none;
+
+ &::after {
+ padding-right: $em-spacer-5;
+ padding-left: $em-spacer-5;
+ // stylelint-disable-next-line primer/colors
+ color: $border-gray;
+ content: "/";
+ }
+
+ &:first-child {
+ margin-left: 0;
+ }
+}
+
+.breadcrumb-item-selected,
+.breadcrumb-item[aria-current]:not([aria-current="false"]) {
+ color: $text-gray;
+
+ &::after {
+ content: none;
+ }
+}
diff --git a/_sass/lib/@primer/css/breadcrumb/index.scss b/_sass/lib/@primer/css/breadcrumb/index.scss
new file mode 100644
index 00000000..2b95a885
--- /dev/null
+++ b/_sass/lib/@primer/css/breadcrumb/index.scss
@@ -0,0 +1,3 @@
+// support files
+@import "../support/index.scss";
+@import "./breadcrumb.scss";
diff --git a/_sass/lib/@primer/css/buttons/README.md b/_sass/lib/@primer/css/buttons/README.md
new file mode 100644
index 00000000..3e662178
--- /dev/null
+++ b/_sass/lib/@primer/css/buttons/README.md
@@ -0,0 +1,24 @@
+---
+bundle: "buttons"
+generated: true
+---
+
+# Primer CSS: `buttons` bundle
+
+## Usage
+
+Primer CSS source files are written in [SCSS]. To include this Primer CSS module in your own build, ensure that your `node_modules` directory is listed in your Sass include paths, then import it with:
+
+```scss
+@import "@primer/css/buttons/index.scss";
+```
+
+## Build
+
+The `@primer/css` npm package includes a standalone CSS build of this module in `dist/buttons.css`.
+
+## License
+
+[MIT](https://github.com/primer/css/blob/master/LICENSE) © [GitHub](https://github.com/)
+
+[scss]: https://sass-lang.com/documentation/syntax#scss
diff --git a/_sass/lib/@primer/css/buttons/button-group.scss b/_sass/lib/@primer/css/buttons/button-group.scss
new file mode 100644
index 00000000..d064cc94
--- /dev/null
+++ b/_sass/lib/@primer/css/buttons/button-group.scss
@@ -0,0 +1,91 @@
+// Button group
+//
+// A button group is a series of buttons laid out next to each other, all part
+// of one visual button, but separated by rules to be separate.
+
+.BtnGroup {
+ display: inline-block;
+ vertical-align: middle;
+ @include clearfix();
+
+ // Proper spacing for multiple button groups (a la, gollum editor)
+ + .BtnGroup,
+ + .btn {
+ margin-left: $spacer-1;
+ }
+}
+
+.BtnGroup-item {
+ position: relative;
+ float: left;
+ border-right-width: 0;
+ border-radius: 0;
+
+ &:first-child {
+ border-top-left-radius: $border-radius;
+ border-bottom-left-radius: $border-radius;
+ }
+
+ &:last-child {
+ border-right-width: $border-width;
+ border-top-right-radius: $border-radius;
+ border-bottom-right-radius: $border-radius;
+ }
+
+ &.selected,
+ &[aria-selected="true"],
+ &:focus,
+ &:active,
+ &:hover {
+ border-right-width: $border-width;
+
+ + .BtnGroup-item,
+ + .BtnGroup-parent .BtnGroup-item {
+ border-left-width: 0;
+ }
+ }
+}
+
+.BtnGroup-parent {
+ float: left;
+
+ &:first-child .BtnGroup-item {
+ border-top-left-radius: $border-radius;
+ border-bottom-left-radius: $border-radius;
+ }
+
+ &:last-child .BtnGroup-item {
+ border-right-width: $border-width;
+ border-top-right-radius: $border-radius;
+ border-bottom-right-radius: $border-radius;
+ }
+
+ .BtnGroup-item {
+ border-right-width: 0;
+ border-radius: 0;
+ }
+
+ &.selected,
+ &[aria-selected="true"],
+ &:focus,
+ &:active,
+ &:hover {
+ .BtnGroup-item {
+ border-right-width: $border-width;
+ }
+
+ + .BtnGroup-item,
+ + .BtnGroup-parent .BtnGroup-item {
+ border-left-width: 0;
+ }
+ }
+}
+
+// ensure that the focus ring sits above the adjacent buttons
+.BtnGroup-item,
+.BtnGroup-parent {
+ &:focus,
+ &:active {
+ z-index: 1;
+ }
+}
diff --git a/_sass/lib/@primer/css/buttons/button.scss b/_sass/lib/@primer/css/buttons/button.scss
new file mode 100644
index 00000000..238db7ed
--- /dev/null
+++ b/_sass/lib/@primer/css/buttons/button.scss
@@ -0,0 +1,296 @@
+// stylelint-disable selector-max-type, block-opening-brace-space-before, no-duplicate-selectors
+
+// Base button styles
+.btn {
+ position: relative;
+ display: inline-block;
+ // stylelint-disable-next-line primer/spacing
+ padding: 5px $spacer-3;
+ font-size: $body-font-size;
+ font-weight: $font-weight-semibold;
+ // stylelint-disable-next-line primer/typography
+ line-height: 20px; // Specifically not inherit our `` default
+ white-space: nowrap;
+ vertical-align: middle;
+ cursor: pointer;
+ user-select: none;
+ border: $border-width $border-style;
+ border-radius: $border-radius;
+ appearance: none; // Corrects inability to style clickable `input` types in iOS.
+
+ &:hover {
+ text-decoration: none;
+ }
+
+ &:disabled,
+ &.disabled,
+ &[aria-disabled="true"] {
+ cursor: default;
+
+ .octicon {
+ color: inherit;
+ }
+ }
+
+ i {
+ font-style: normal;
+ font-weight: $font-weight-semibold;
+ opacity: 0.75;
+ }
+
+ .octicon {
+ margin-right: $spacer-1;
+ color: $text-gray-light;
+ vertical-align: text-bottom;
+
+ &:only-child {
+ margin-right: 0;
+ }
+ }
+
+ .Counter {
+ // stylelint-disable-next-line primer/spacing
+ margin-left: 2px;
+ color: inherit;
+ text-shadow: none;
+ vertical-align: top;
+ // stylelint-disable-next-line primer/colors
+ background-color: rgba(
+ $black,
+ 0.08
+ ); // Darken for just a tad more contrast against the button background
+ }
+
+ .dropdown-caret {
+ margin-left: $spacer-1;
+ opacity: 0.8;
+ }
+}
+
+// Default button
+
+.btn {
+ $bg-default: $bg-gray-light;
+ $bg-hover: #f3f4f6; // custom gray
+ $bg-active: darken($bg-hover, 2%);
+ $bg-disabled: $bg-default;
+
+ color: $text-gray-dark;
+ background-color: $bg-default;
+ border-color: $border-color-button;
+ box-shadow: $box-shadow, $box-shadow-highlight;
+ transition: background-color 0.2s cubic-bezier(0.3, 0, 0.5, 1);
+
+ &:hover,
+ &.hover,
+ [open] > & {
+ background-color: $bg-hover;
+ transition-duration: 0.1s;
+ }
+
+ &:active,
+ &.selected,
+ &[aria-selected="true"] {
+ background-color: $bg-active;
+ box-shadow: $box-shadow-inset;
+ transition: none;
+ }
+
+ &:disabled,
+ &.disabled,
+ &[aria-disabled="true"] {
+ // stylelint-disable-next-line primer/colors
+ color: $gray-400;
+ background-color: $bg-disabled;
+ border-color: $border-color-button;
+ }
+
+ // Keep :focus after :disabled. Allows to see the focus ring even on disabled buttons
+ &:focus,
+ &.focus {
+ outline: 1px dotted transparent; // Support Firfox custom colors
+ outline-offset: 2px;
+ box-shadow: $box-shadow-focus;
+ }
+}
+
+// Primary button
+
+.btn-primary {
+ $bg-default: #2ea44f; // custom green
+ $bg-hover: #2c974b; // custom green
+ $bg-active: darken($bg-hover, 2%);
+ $bg-disabled: #94d3a2; // custom green
+
+ $shadow: $green-900;
+ $box-shadow: 0 1px 0 rgba($black, 0.1), inset 0 1px 0 rgba($white, 0.03);
+
+ color: $text-white;
+ background-color: $bg-default;
+ // stylelint-disable-next-line primer/borders
+ border-color: rgba($black, 0.15);
+ box-shadow: $box-shadow;
+
+ &:hover,
+ &.hover,
+ [open] > & {
+ background-color: $bg-hover;
+ }
+
+ &:active,
+ &.selected,
+ &[aria-selected="true"] {
+ background-color: $bg-active;
+ // stylelint-disable-next-line primer/box-shadow
+ box-shadow: inset 0 1px 0 rgba($shadow, 0.2);
+ }
+
+ &:disabled,
+ &.disabled,
+ &[aria-disabled="true"] {
+ // stylelint-disable-next-line primer/colors
+ color: rgba($text-white, 0.8);
+ background-color: $bg-disabled;
+ // stylelint-disable-next-line primer/borders
+ border-color: rgba($black, 0.1);
+ box-shadow: $box-shadow;
+ }
+
+ &:focus,
+ &.focus {
+ // stylelint-disable-next-line primer/box-shadow
+ box-shadow: 0 0 0 3px rgba($bg-default, 0.4);
+ }
+
+ .Counter {
+ color: inherit;
+ // stylelint-disable-next-line primer/colors
+ background-color: rgba($bg-white, 0.2);
+ }
+
+ .octicon {
+ // stylelint-disable-next-line primer/colors
+ color: rgba($text-white, 0.8);
+ }
+}
+
+// Mixin: btn-inverse-on-hover
+
+@mixin btn-inverse-on-hover($color, $bg-hover, $bg-active, $shadow) {
+ color: $color;
+ transition: none;
+
+ &:hover,
+ [open] > & {
+ color: $text-white;
+ background-color: $bg-hover;
+ border-color: rgba($black, 0.15);
+ box-shadow: 0 1px 0 rgba($black, 0.1), inset 0 1px 0 rgba($white, 0.03);
+
+ .Counter {
+ background-color: rgba($bg-white, 0.2);
+ }
+
+ .octicon {
+ color: inherit;
+ }
+ }
+
+ &:active,
+ &.selected,
+ &[aria-selected="true"] {
+ color: $text-white;
+ background-color: $bg-active;
+ border-color: rgba($black, 0.15);
+ box-shadow: inset 0 1px 0 rgba($shadow, 0.2);
+ }
+
+ &:disabled,
+ &.disabled,
+ &[aria-disabled="true"] {
+ color: rgba($color, 0.5);
+ background-color: $bg-gray-light;
+ border-color: $border-color-button;
+ box-shadow: $box-shadow, $box-shadow-highlight;
+
+ .Counter {
+ background-color: rgba($color, 0.05);
+ }
+ }
+
+ &:focus {
+ box-shadow: 0 0 0 3px rgba($bg-hover, 0.4);
+ }
+
+ .Counter {
+ color: inherit;
+ background-color: rgba($color, 0.1);
+ }
+}
+
+// Danger button
+
+.btn-danger {
+ @include btn-inverse-on-hover(
+ $color: $text-red,
+ $bg-hover: $red-600,
+ $bg-active: darken($red-600, 3%),
+ $shadow: $red-900
+ );
+}
+
+// Outline button
+
+.btn-outline {
+ @include btn-inverse-on-hover(
+ $color: $blue-500,
+ $bg-hover: $blue-500,
+ $bg-active: darken($blue-500, 3%),
+ $shadow: $blue-900
+ );
+}
+
+// Solid buttons TODO: Deprecate?
+//
+//
+.btn-blue {
+ @include btn-solid(
+ $text-white,
+ lighten($blue-500, 8%),
+ darken($blue-500, 2%)
+ );
+}
+
+// Sizes
+//
+// Tweak `line-height` to make them smaller.
+.btn-sm {
+ // stylelint-disable-next-line primer/spacing
+ padding: 3px 12px;
+ font-size: $font-size-small;
+ // stylelint-disable-next-line primer/typography
+ line-height: 20px;
+
+ .octicon {
+ vertical-align: text-top;
+ }
+}
+
+// Large button adds more padding around text. Use font-size utils to increase font-size.. e.g,
+.btn-large {
+ padding: $em-spacer-6 1.5em;
+ font-size: inherit;
+ line-height: $lh-default;
+
+ // stylelint-disable-next-line primer/borders
+ border-radius: 0.5em;
+}
+
+// Full-width button
+//
+// These buttons expand to the full width of their parent container
+.btn-block {
+ display: block;
+ width: 100%;
+ text-align: center;
+}
diff --git a/_sass/lib/@primer/css/buttons/index.scss b/_sass/lib/@primer/css/buttons/index.scss
new file mode 100644
index 00000000..fcb71f35
--- /dev/null
+++ b/_sass/lib/@primer/css/buttons/index.scss
@@ -0,0 +1,4 @@
+@import "../support/index.scss";
+@import "./button.scss";
+@import "./button-group.scss";
+@import "./misc.scss";
diff --git a/_sass/lib/@primer/css/buttons/misc.scss b/_sass/lib/@primer/css/buttons/misc.scss
new file mode 100644
index 00000000..dc5e9d7b
--- /dev/null
+++ b/_sass/lib/@primer/css/buttons/misc.scss
@@ -0,0 +1,205 @@
+// stylelint-disable selector-max-type
+
+// Link-like buttons
+//
+// This class is for styling