mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-09-16 22:23:32 -06:00
Compare commits
1 Commits
v0.6.2
...
automatic-
Author | SHA1 | Date | |
---|---|---|---|
|
f2657db1d1 |
2
.github/FUNDING.yml
vendored
2
.github/FUNDING.yml
vendored
@@ -1,2 +0,0 @@
|
||||
github: just-the-docs
|
||||
open_collective: just-the-docs
|
4
.github/workflows/publish-gem.yml
vendored
4
.github/workflows/publish-gem.yml
vendored
@@ -10,8 +10,8 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Setup Ruby 3.2
|
||||
uses: ruby/setup-ruby@v1
|
||||
- name: Set up Ruby 3.2
|
||||
uses: actions/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: "3.2"
|
||||
|
||||
|
32
.gitignore
vendored
32
.gitignore
vendored
@@ -1,30 +1,8 @@
|
||||
# Not sure what a .gitignore is?
|
||||
# See: https://git-scm.com/docs/gitignore
|
||||
|
||||
# The first files are directly copied from Jekyll's first-party docs on `.gitignore` files:
|
||||
# https://jekyllrb.com/tutorials/using-jekyll-with-bundler/#commit-to-source-control
|
||||
|
||||
# Ignore the default location of the built site, and caches and metadata generated by Jekyll
|
||||
_site/
|
||||
.sass-cache/
|
||||
.jekyll-cache/
|
||||
.jekyll-metadata
|
||||
|
||||
# Ignore folders generated by Bundler
|
||||
.bundle/
|
||||
vendor/
|
||||
|
||||
# These next files are used by Just the Docs developers. They are not necessary for end users of the theme, only developers.
|
||||
|
||||
# We use Stylelint and Prettier, JavaScript tools, to lint and format our own code.
|
||||
# We use Node.js as our runtime, so we ignore node_modules
|
||||
node_modules
|
||||
|
||||
# .DS_Store is a macOS-only metadata file about directories. Convention is to not commit them.
|
||||
# See: https://en.wikipedia.org/wiki/.DS_Store
|
||||
.DS_Store
|
||||
|
||||
# These are legacy globs that typically target Ruby theme developers. We may change these at a later date.
|
||||
*.gem
|
||||
.bundle
|
||||
.ruby-version
|
||||
.jekyll-cache
|
||||
.sass-cache
|
||||
_site
|
||||
node_modules
|
||||
.DS_Store
|
||||
|
28
CHANGELOG.md
28
CHANGELOG.md
@@ -19,34 +19,6 @@ Code changes to `main` that are *not* in the latest release:
|
||||
|
||||
- N/A
|
||||
|
||||
## Release v0.6.2
|
||||
|
||||
Hi all, this is a small patch release that includes two changes: adding a missing Windows emoji font fallback, and removing some (now-unused) code introduced in 0.6.
|
||||
|
||||
### Bugfixes
|
||||
|
||||
- Fixed: Windows emoji font fallback by [@flanakin] in [#1337]
|
||||
- Removed: unused `.passive` toggle in navigation by [@pdmosses] in [#1335]
|
||||
|
||||
[#1335]: https://github.com/just-the-docs/just-the-docs/pull/1335
|
||||
[#1337]: https://github.com/just-the-docs/just-the-docs/pull/1337
|
||||
|
||||
### New Contributors
|
||||
|
||||
- [@flanakin] made their first contribution in [#1337]
|
||||
|
||||
[@flanakin]: https://github.com/flanakin
|
||||
|
||||
## Release v0.6.1
|
||||
|
||||
Hi all, this is a small patch release that only includes one change: resolving a bug introduced in 0.6.0 that causes a JS error for pages excluded from navigation.
|
||||
|
||||
### Bugfixes
|
||||
|
||||
- Fixed: JS error for pages excluded from navigation by [@pdmosses] in [#1332]
|
||||
|
||||
[#1332]: https://github.com/just-the-docs/just-the-docs/pull/1332
|
||||
|
||||
## Release v0.6.0
|
||||
|
||||
Hi all, this is a minor release that introduces performance improvements for build times on large sites, correctly sets the `color-scheme` property, and fixes invalid HTML. However, it introduces some potentially-breaking *internal* changes to undocumented features of the theme.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
just-the-docs (0.6.1)
|
||||
just-the-docs (0.6.0)
|
||||
jekyll (>= 3.8.5)
|
||||
jekyll-include-cache
|
||||
jekyll-seo-tag (>= 2.0)
|
||||
|
@@ -140,7 +140,11 @@ gh_edit_branch: "main" # the branch that your docs is served from
|
||||
gh_edit_view_mode: "tree" # "tree" or "edit" if you want the user to jump into the editor immediately
|
||||
|
||||
# Color scheme currently only supports "dark", "light"/nil (default), or a custom scheme that you define
|
||||
color_scheme: nil
|
||||
color_scheme: auto
|
||||
color_scheme_options:
|
||||
enable_localstorage: true
|
||||
enable_switch: true
|
||||
switch_options: ["auto", "light", "dark"]
|
||||
|
||||
callouts_level: quiet # or loud
|
||||
callouts:
|
||||
|
@@ -11,5 +11,12 @@
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% if site.color_scheme_options and site.color_scheme_options.switch_options %}
|
||||
<li class="aux-nav-list-item">
|
||||
<button class="site-button color-scheme-switch-theme-button" aria-label="Switch color scheme">
|
||||
<svg aria-hidden="true" class="site-button-icon"><use href="#svg-{{ site.color_scheme | default: 'light' }}"></use></svg>
|
||||
</button>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</nav>
|
||||
|
@@ -5,7 +5,7 @@
|
||||
<div></div>
|
||||
{% endif %}
|
||||
{% include header_custom.html %}
|
||||
{% if site.aux_links %}
|
||||
{% if site.aux_links or site.color_scheme_options and site.color_scheme_options.switch_options %}
|
||||
{% include components/aux_nav.html %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
@@ -134,10 +134,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
// Styling for nav-list-expanders at first and second levels:
|
||||
// Styling for nav-list-expanders at first and second levels,
|
||||
// suppressed when a click has deactivated the expander (making the nav-list-item .passive):
|
||||
{{ activation_collection_prefix }} {
|
||||
> .nav-list-item:nth-child({{ activation_first_level_index }}){%- if activation_second_level_index %},
|
||||
> .nav-list-item:nth-child({{ activation_first_level_index }}) > .nav-list > .nav-list-item:nth-child({{ activation_second_level_index }}){% endif %} {
|
||||
> .nav-list-item:not(.passive):nth-child({{ activation_first_level_index }}){%- if activation_second_level_index %},
|
||||
> .nav-list-item:not(.passive):nth-child({{ activation_first_level_index }}) > .nav-list > .nav-list-item:not(.passive):nth-child({{ activation_second_level_index }}){% endif %} {
|
||||
> .nav-list-expander svg {
|
||||
@if $nav-list-expander-right {
|
||||
transform: rotate(-90deg);
|
||||
@@ -153,7 +154,7 @@
|
||||
}
|
||||
|
||||
// Styling for nav-list-expander for categories:
|
||||
.site-nav > .nav-category-list > .nav-list-item {
|
||||
.site-nav > .nav-category-list > .nav-list-item:not(.passive) {
|
||||
> .nav-list-expander svg {
|
||||
@if $nav-list-expander-right {
|
||||
transform: rotate(-90deg);
|
||||
|
@@ -14,7 +14,48 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
|
||||
<link rel="stylesheet" href="{{ '/assets/css/just-the-docs-default.css' | relative_url }}">
|
||||
{% if site.color_scheme_options and site.color_scheme_options.enable_localstorage %}
|
||||
<script>
|
||||
(function(){
|
||||
function createThemeStylesheet(theme, media) {
|
||||
var link = document.createElement('link');
|
||||
link.rel = 'stylesheet';
|
||||
link.type = 'text/css';
|
||||
link.href = "{{ '/assets/css/just-the-docs-*.css' | relative_url }}".replace("*",theme);
|
||||
if(media) link.media = media;
|
||||
return link;
|
||||
}
|
||||
|
||||
var theme = window.localStorage.getItem('theme');
|
||||
var head = document.getElementsByTagName('head')[0];
|
||||
|
||||
if (theme === null) {
|
||||
theme = "{{ site.color_scheme }}";
|
||||
}
|
||||
|
||||
if (theme === "nil") {
|
||||
theme = "default";
|
||||
}
|
||||
|
||||
if (theme === "auto") {
|
||||
head.appendChild(createThemeStylesheet('light', '(prefers-color-scheme: light)'));
|
||||
head.appendChild(createThemeStylesheet('dark', '(prefers-color-scheme: dark)'));
|
||||
} else {
|
||||
head.appendChild(createThemeStylesheet(theme || "default"));
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
{% else %}
|
||||
{% case site.color_scheme %}
|
||||
{% when "auto" %}
|
||||
<link rel="stylesheet" href="{{ '/assets/css/just-the-docs-light.css' | relative_url }}" type="text/css" media="(prefers-color-scheme: light)">
|
||||
<link rel="stylesheet" href="{{ '/assets/css/just-the-docs-dark.css' | relative_url }}" type="text/css" media="(prefers-color-scheme: dark)">
|
||||
{% when nil %}
|
||||
<link rel="stylesheet" href="{{ '/assets/css/just-the-docs-default.css' | relative_url }}" type="text/css">
|
||||
{% else %}
|
||||
<link rel="stylesheet" href="{{ site.color_scheme | prepend: '/assets/css/just-the-docs-' | append: '.css' | relative_url }}" type="text/css">
|
||||
{% endcase %}
|
||||
{% endif %}
|
||||
|
||||
{% include head_nav.html %}
|
||||
|
||||
|
@@ -28,7 +28,7 @@
|
||||
{%- assign color_scheme = "light" -%}
|
||||
{%- endif %}
|
||||
@import "./color_schemes/light";
|
||||
{% unless color_scheme == "light" %}
|
||||
{% unless color_scheme == "light" or color_scheme == "auto" %}
|
||||
@import "./color_schemes/{{ color_scheme }}";
|
||||
{% endunless %}
|
||||
{{ activation }}
|
||||
|
@@ -10,4 +10,7 @@
|
||||
{% if site.enable_copy_code_button != false %}
|
||||
{% include icons/code_copy.html %}
|
||||
{% endif %}
|
||||
{% if site.color_scheme_options and site.color_scheme_options.enable_switch %}
|
||||
{% include icons/switch_color_scheme.html %}
|
||||
{% endif %}
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 432 B After Width: | Height: | Size: 576 B |
29
_includes/icons/switch_color_scheme.html
Normal file
29
_includes/icons/switch_color_scheme.html
Normal file
@@ -0,0 +1,29 @@
|
||||
<!-- Feather. Public domain or under the CC0-1.0-Universal license: https://github.com/python/peps/blob/ebff37d5e7728377035b1e1ce9c9796ed63940b1/pep_sphinx_extensions/LICENCE.rst -->
|
||||
<symbol id="svg-auto" viewBox="0 0 24 24" pointer-events="all">
|
||||
<title>Following system colour scheme</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<circle cx="12" cy="12" r="9"></circle>
|
||||
<path d="M12 3v18m0-12l4.65-4.65M12 14.3l7.37-7.37M12 19.6l8.85-8.85"></path>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-dark" viewBox="0 0 24 24" pointer-events="all">
|
||||
<title>Selected dark colour scheme</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
||||
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z"></path>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-light" viewBox="0 0 24 24" pointer-events="all">
|
||||
<title>Selected light colour scheme</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<circle cx="12" cy="12" r="5"></circle>
|
||||
<line x1="12" y1="1" x2="12" y2="3"></line>
|
||||
<line x1="12" y1="21" x2="12" y2="23"></line>
|
||||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
||||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
||||
<line x1="1" y1="12" x2="3" y2="12"></line>
|
||||
<line x1="21" y1="12" x2="23" y2="12"></line>
|
||||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
||||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
||||
</svg>
|
||||
</symbol>
|
@@ -140,11 +140,32 @@
|
||||
}
|
||||
}
|
||||
|
||||
button.site-button {
|
||||
background: none;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.site-button {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
padding: $gutter-spacing-sm;
|
||||
align-items: center;
|
||||
|
||||
.site-button-icon {
|
||||
width: #{$sp-4 * 1.2};
|
||||
height: #{$sp-4 * 1.2};
|
||||
align-self: center;
|
||||
color: $grey-dk-000;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active {
|
||||
.site-button-icon {
|
||||
color: $link-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include mq(md) {
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
// prettier-ignore
|
||||
$body-font-family: system-ui, -apple-system, blinkmacsystemfont, "Segoe UI",
|
||||
roboto, "Helvetica Neue", arial, sans-serif, "Segoe UI Emoji" !default;
|
||||
roboto, "Helvetica Neue", arial, sans-serif !default;
|
||||
$mono-font-family: "SFMono-Regular", menlo, consolas, monospace !default;
|
||||
$root-font-size: 16px !default; // DEPRECATED: previously base font-size for rems
|
||||
$body-line-height: 1.4 !default;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
---
|
||||
{% if site.color_scheme and site.color_scheme != "nil" %}
|
||||
{% if site.color_scheme and site.color_scheme != "nil" and site.color_scheme != "auto" %}
|
||||
{% assign color_scheme = site.color_scheme %}
|
||||
{% else %}
|
||||
{% assign color_scheme = "light" %}
|
||||
|
@@ -31,7 +31,10 @@ function initNav() {
|
||||
}
|
||||
if (target) {
|
||||
e.preventDefault();
|
||||
target.ariaPressed = target.parentNode.classList.toggle('active');
|
||||
const active = target.parentNode.classList.toggle('active');
|
||||
const passive = target.parentNode.classList.toggle('passive');
|
||||
if (active && passive) target.parentNode.classList.toggle('passive');
|
||||
target.ariaPressed = active;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -73,9 +76,7 @@ function initNav() {
|
||||
// The page-specific stylesheet is assumed to have index 1 in the list of stylesheets.
|
||||
|
||||
function disableHeadStyleSheet() {
|
||||
if (document.styleSheets[1]) {
|
||||
document.styleSheets[1].disabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
{%- if site.search_enabled != false %}
|
||||
@@ -464,13 +465,56 @@ function searchLoaded(index, docs) {
|
||||
// Switch theme
|
||||
|
||||
jtd.getTheme = function() {
|
||||
var cssFileHref = document.querySelector('[rel="stylesheet"]').getAttribute('href');
|
||||
var cssFile = document.querySelector('[rel="stylesheet"]');
|
||||
if(cssFile.hasAttribute('media')) return 'auto';
|
||||
|
||||
var cssFileHref = cssFile.getAttribute('href');
|
||||
return cssFileHref.substring(cssFileHref.lastIndexOf('-') + 1, cssFileHref.length - 4);
|
||||
}
|
||||
|
||||
jtd.setTheme = function(theme) {
|
||||
var cssFile = document.querySelector('[rel="stylesheet"]');
|
||||
cssFile.setAttribute('href', '{{ "assets/css/just-the-docs-" | relative_url }}' + theme + '.css');
|
||||
function createThemeStylesheet(theme, media) {
|
||||
var link = document.createElement('link');
|
||||
link.rel = 'stylesheet';
|
||||
link.type = 'text/css';
|
||||
link.href = "{{ '/assets/css/just-the-docs-*.css' | relative_url }}".replace("*",theme);
|
||||
if(media) link.media = media;
|
||||
return link;
|
||||
}
|
||||
var cssFiles = [...document.querySelectorAll('[rel="stylesheet"]')];
|
||||
if(theme === "auto") {
|
||||
cssFiles.at(-1).insertAdjacentElement('afterend', createThemeStylesheet('light', '(prefers-color-scheme: light)'));
|
||||
cssFiles.at(-1).insertAdjacentElement('afterend', createThemeStylesheet('dark', '(prefers-color-scheme: dark)'));
|
||||
} else {
|
||||
cssFiles.at(-1).insertAdjacentElement('afterend', createThemeStylesheet(theme || "default"));
|
||||
}
|
||||
setTimeout(() => cssFiles.forEach(it => it.remove()), 100);
|
||||
}
|
||||
|
||||
jtd.switchThemeButton = function(button, event) {
|
||||
{% if site.color_scheme_options and site.color_scheme_options.switch_options %}
|
||||
const themes = {{ site.color_scheme_options.switch_options | jsonify }};
|
||||
{% else %}
|
||||
const themes = ["auto", "light", "dark"];
|
||||
{% endif %}
|
||||
var currentTheme = jtd.getTheme();
|
||||
var nextTheme = themes[(themes.indexOf(currentTheme)+1)%themes.length];
|
||||
jtd.setTheme(nextTheme);
|
||||
button.getElementsByTagName('svg')[0].getElementsByTagName('use')[0].setAttribute('href',`#svg-${nextTheme}`);
|
||||
{% if site.color_scheme_options and site.color_scheme_options.enable_localstorage %}
|
||||
window.localStorage.setItem('theme', nextTheme);
|
||||
{% endif %}
|
||||
}
|
||||
|
||||
function initSwitchThemeButton() {
|
||||
var buttons = [...document.getElementsByClassName("color-scheme-switch-theme-button")];
|
||||
{% if site.color_scheme_options and site.color_scheme_options.enable_localstorage != false %}
|
||||
theme = window.localStorage.getItem('theme');
|
||||
if(theme != null){
|
||||
buttons.forEach(button => button.getElementsByTagName('svg')[0].getElementsByTagName('use')[0].setAttribute('href',`#svg-${theme}`));
|
||||
}
|
||||
{% endif %}
|
||||
buttons.forEach(button => jtd.addEvent(button, 'click', event => jtd.switchThemeButton(button, event)));
|
||||
}
|
||||
|
||||
// Note: pathname can have a trailing slash on a local jekyll server
|
||||
@@ -495,7 +539,8 @@ function scrollNav() {
|
||||
}
|
||||
|
||||
// Find the nav-list-link that refers to the current page
|
||||
// then make it and all enclosing nav-list-item elements active.
|
||||
// then make it and all enclosing nav-list-item elements active,
|
||||
// and make all other folded collections passive
|
||||
|
||||
function activateNav() {
|
||||
var target = navLink();
|
||||
@@ -511,6 +556,17 @@ function activateNav() {
|
||||
target = target.parentNode;
|
||||
}
|
||||
}
|
||||
const elements = document.getElementsByClassName("nav-category-list");
|
||||
for (const element of elements) {
|
||||
const item = element.children[0];
|
||||
const active = item.classList.toggle('active');
|
||||
if (active) {
|
||||
item.classList.toggle('active', false);
|
||||
item.classList.toggle('passive', true);
|
||||
} else {
|
||||
item.classList.toggle('active', true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Document ready
|
||||
@@ -520,6 +576,9 @@ jtd.onReady(function(){
|
||||
{%- if site.search_enabled != false %}
|
||||
initSearch();
|
||||
{%- endif %}
|
||||
{%- if site.enable_switch_color_scheme != false %}
|
||||
initSwitchThemeButton();
|
||||
{%- endif %}
|
||||
activateNav();
|
||||
scrollNav();
|
||||
});
|
||||
|
@@ -52,7 +52,7 @@ New (v0.4.2)
|
||||
{: .label .label-green }
|
||||
|
||||
|
||||
In Just the Docs version `0.4.2`, we changed the default syntax highlighting theme for the `light` color scheme to have higher contrast. Users who want to use the old highlighting need to explicitly opt-in with the deprecated `legacy_light` color scheme. In a future major release of Just the Docs, we will remove this color scheme.
|
||||
In Just the Docs version `0.4.2`, we changed the default syntax highlighting theme for the `light` color scheme to have higher contrast. Users who are want to use the old highlighting need to explicitly opt-in with the deprecated `legacy_light` color scheme. In a future major release of Just the Docs, we will remove this color scheme.
|
||||
|
||||
## Custom schemes
|
||||
|
||||
|
@@ -20,7 +20,7 @@ nav_order: 5
|
||||
|
||||
## Main navigation
|
||||
|
||||
The main navigation for your Just the Docs site is on the left side of the page on large screens and on the top (behind a tap) on small screens. The main navigation can be structured to accommodate a multi-level menu system (pages with children and grandchildren).
|
||||
The main navigation for your Just the Docs site is on the left side of the page at large screens and on the top (behind a tap) on small screens. The main navigation can be structured to accommodate a multi-level menu system (pages with children and grandchildren).
|
||||
|
||||
By default, all pages will appear as top level pages in the main nav unless a parent page is defined (see [Pages with Children](#pages-with-children)).
|
||||
|
||||
@@ -300,7 +300,7 @@ This example skips the page name heading (`#`) from the TOC, as well as the head
|
||||
|
||||
### Collapsible Table of Contents
|
||||
|
||||
The Table of Contents can be made collapsible using the `<details>` and `<summary>` elements, as in the following example. The attribute `open` (expands the Table of Contents by default) and the styling with `{: .text-delta }` are optional.
|
||||
The Table of Contents can be made collapsible using the `<details>` and `<summary>` elements , as in the following example. The attribute `open` (expands the Table of Contents by default) and the styling with `{: .text-delta }` are optional.
|
||||
|
||||
```markdown
|
||||
<details open markdown="block">
|
||||
|
@@ -21,7 +21,7 @@ nav_order: 1
|
||||
By default, Just the Docs uses a native system font stack for sans-serif fonts:
|
||||
|
||||
```scss
|
||||
system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Segoe UI Emoji"
|
||||
system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif
|
||||
```
|
||||
|
||||
ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
|
@@ -61,7 +61,7 @@ Use `mx-auto` to horizontally center elements.
|
||||
In Markdown, use the `{: }` wrapper to apply custom classes:
|
||||
|
||||
```markdown
|
||||
This paragraph will have a margin bottom of 1rem/16px on large screens.
|
||||
This paragraph will have a margin bottom of 1rem/16px at large screens.
|
||||
{: .mb-lg-4 }
|
||||
|
||||
This paragraph will have 2rem/32px of padding on the right and left at all screen sizes.
|
||||
|
@@ -9,5 +9,5 @@ permalink: docs/utilities
|
||||
# Utilities
|
||||
{: .no_toc }
|
||||
|
||||
CSS utility classes come in handy when you want to override default styles to create additional whitespace (margins/padding), correct unexpected shifts in font size or weight, add color, or hide (or show) something at a specific screen size.
|
||||
CSS utility classes come in handy when you to want to override default styles to create additional whitespace (margins/padding), correct unexpected shifts in font size or weight, add color, or hide (or show) something at a specific screen size.
|
||||
{: .fs-6 .fw-300 }
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
Gem::Specification.new do |spec|
|
||||
spec.name = "just-the-docs"
|
||||
spec.version = "0.6.2"
|
||||
spec.version = "0.6.0"
|
||||
spec.authors = ["Patrick Marsceill", "Matthew Wang"]
|
||||
spec.email = ["patrick.marsceill@gmail.com", "matt@matthewwang.me"]
|
||||
|
||||
|
134
package-lock.json
generated
134
package-lock.json
generated
@@ -10,9 +10,9 @@
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"npm-run-all": "^4.1.5",
|
||||
"prettier": "^3.0.3",
|
||||
"prettier": "^3.0.2",
|
||||
"stylelint": "^15.10.3",
|
||||
"stylelint-config-standard-scss": "^11.0.0"
|
||||
"stylelint-config-standard-scss": "^10.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/code-frame": {
|
||||
@@ -2023,7 +2023,7 @@
|
||||
"node_modules/postcss-media-query-parser": {
|
||||
"version": "0.2.3",
|
||||
"resolved": "https://registry.npmjs.org/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz",
|
||||
"integrity": "sha512-3sOlxmbKcSHMjlUXQZKQ06jOswE7oVkXPxmZdoB1r5l0q6gTFTQSHxNxOrCccElbW7dxNytifNEo8qidX2Vsig==",
|
||||
"integrity": "sha1-J7Ocb02U+Bsac7j3Y1HGCeXO8kQ=",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/postcss-resolve-nested-selector": {
|
||||
@@ -2049,9 +2049,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/postcss-scss": {
|
||||
"version": "4.0.7",
|
||||
"resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-4.0.7.tgz",
|
||||
"integrity": "sha512-xPv2GseoyXPa58Nro7M73ZntttusuCmZdeOojUFR5PZDz2BR62vfYx1w9TyOnp1+nYFowgOMipsCBhxzVkAEPw==",
|
||||
"version": "4.0.6",
|
||||
"resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-4.0.6.tgz",
|
||||
"integrity": "sha512-rLDPhJY4z/i4nVFZ27j9GqLxj1pwxE80eAzUNRMXtcpipFYIeowerzBgG3yJhMtObGEXidtIgbUpQ3eLDsf5OQ==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -2061,10 +2061,6 @@
|
||||
{
|
||||
"type": "tidelift",
|
||||
"url": "https://tidelift.com/funding/github/npm/postcss-scss"
|
||||
},
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
],
|
||||
"engines": {
|
||||
@@ -2094,9 +2090,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/prettier": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz",
|
||||
"integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==",
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.2.tgz",
|
||||
"integrity": "sha512-o2YR9qtniXvwEZlOKbveKfDQVyqxbEIWn48Z8m3ZJjBjcCmUy3xZGIv+7AkaeuaTr6yPXJjwv07ZWlsWbEy1rQ==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"prettier": "bin/prettier.cjs"
|
||||
@@ -2645,30 +2641,27 @@
|
||||
}
|
||||
},
|
||||
"node_modules/stylelint-config-recommended": {
|
||||
"version": "13.0.0",
|
||||
"resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-13.0.0.tgz",
|
||||
"integrity": "sha512-EH+yRj6h3GAe/fRiyaoO2F9l9Tgg50AOFhaszyfov9v6ayXJ1IkSHwTxd7lB48FmOeSGDPLjatjO11fJpmarkQ==",
|
||||
"version": "12.0.0",
|
||||
"resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-12.0.0.tgz",
|
||||
"integrity": "sha512-x6x8QNARrGO2sG6iURkzqL+Dp+4bJorPMMRNPScdvaUK8PsynriOcMW7AFDKqkWAS5wbue/u8fUT/4ynzcmqdQ==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "^14.13.1 || >=16.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"stylelint": "^15.10.0"
|
||||
"stylelint": "^15.5.0"
|
||||
}
|
||||
},
|
||||
"node_modules/stylelint-config-recommended-scss": {
|
||||
"version": "13.0.0",
|
||||
"resolved": "https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-13.0.0.tgz",
|
||||
"integrity": "sha512-7AmMIsHTsuwUQm7I+DD5BGeIgCvqYZ4BpeYJJpb1cUXQwrJAKjA+GBotFZgUEGP8lAM+wmd91ovzOi8xfAyWEw==",
|
||||
"version": "12.0.0",
|
||||
"resolved": "https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-12.0.0.tgz",
|
||||
"integrity": "sha512-5Bb2mlGy6WLa30oNeKpZvavv2lowJUsUJO25+OA68GFTemlwd1zbFsL7q0bReKipOSU3sG47hKneZ6Nd+ctrFA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"postcss-scss": "^4.0.7",
|
||||
"stylelint-config-recommended": "^13.0.0",
|
||||
"stylelint-scss": "^5.1.0"
|
||||
"postcss-scss": "^4.0.6",
|
||||
"stylelint-config-recommended": "^12.0.0",
|
||||
"stylelint-scss": "^5.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"postcss": "^8.3.3",
|
||||
"stylelint": "^15.10.0"
|
||||
"stylelint": "^15.5.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"postcss": {
|
||||
@@ -2677,32 +2670,29 @@
|
||||
}
|
||||
},
|
||||
"node_modules/stylelint-config-standard": {
|
||||
"version": "34.0.0",
|
||||
"resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-34.0.0.tgz",
|
||||
"integrity": "sha512-u0VSZnVyW9VSryBG2LSO+OQTjN7zF9XJaAJRX/4EwkmU0R2jYwmBSN10acqZisDitS0CLiEiGjX7+Hrq8TAhfQ==",
|
||||
"version": "33.0.0",
|
||||
"resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-33.0.0.tgz",
|
||||
"integrity": "sha512-eyxnLWoXImUn77+ODIuW9qXBDNM+ALN68L3wT1lN2oNspZ7D9NVGlNHb2QCUn4xDug6VZLsh0tF8NyoYzkgTzg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"stylelint-config-recommended": "^13.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^14.13.1 || >=16.0.0"
|
||||
"stylelint-config-recommended": "^12.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"stylelint": "^15.10.0"
|
||||
"stylelint": "^15.5.0"
|
||||
}
|
||||
},
|
||||
"node_modules/stylelint-config-standard-scss": {
|
||||
"version": "11.0.0",
|
||||
"resolved": "https://registry.npmjs.org/stylelint-config-standard-scss/-/stylelint-config-standard-scss-11.0.0.tgz",
|
||||
"integrity": "sha512-fGE79NBOLg09a9afqGH/guJulRULCaQWWv4cv1v2bMX92B+fGb0y56WqIguwvFcliPmmUXiAhKrrnXilIeXoHA==",
|
||||
"version": "10.0.0",
|
||||
"resolved": "https://registry.npmjs.org/stylelint-config-standard-scss/-/stylelint-config-standard-scss-10.0.0.tgz",
|
||||
"integrity": "sha512-bChBEo1p3xUVWh/wenJI+josoMk21f2yuLDGzGjmKYcALfl2u3DFltY+n4UHswYiXghqXaA8mRh+bFy/q1hQlg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"stylelint-config-recommended-scss": "^13.0.0",
|
||||
"stylelint-config-standard": "^34.0.0"
|
||||
"stylelint-config-recommended-scss": "^12.0.0",
|
||||
"stylelint-config-standard": "^33.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"postcss": "^8.3.3",
|
||||
"stylelint": "^15.10.0"
|
||||
"stylelint": "^15.5.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"postcss": {
|
||||
@@ -2711,9 +2701,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/stylelint-scss": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-5.1.0.tgz",
|
||||
"integrity": "sha512-E+KlQFXv1Euha43qw3q+wKBSli557wxbbo6/39DWhRNXlUa9Cz+FYrcgz+PT6ag0l6UisCYjAGCNhoSl4FcwlA==",
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-5.0.1.tgz",
|
||||
"integrity": "sha512-n87iCRZrr2J7//I/QFsDXxFLnHKw633U4qvWZ+mOW6KDAp/HLj06H+6+f9zOuTYy+MdGdTuCSDROCpQIhw5fvQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"postcss-media-query-parser": "^0.2.3",
|
||||
@@ -4416,7 +4406,7 @@
|
||||
"postcss-media-query-parser": {
|
||||
"version": "0.2.3",
|
||||
"resolved": "https://registry.npmjs.org/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz",
|
||||
"integrity": "sha512-3sOlxmbKcSHMjlUXQZKQ06jOswE7oVkXPxmZdoB1r5l0q6gTFTQSHxNxOrCccElbW7dxNytifNEo8qidX2Vsig==",
|
||||
"integrity": "sha1-J7Ocb02U+Bsac7j3Y1HGCeXO8kQ=",
|
||||
"dev": true
|
||||
},
|
||||
"postcss-resolve-nested-selector": {
|
||||
@@ -4433,9 +4423,9 @@
|
||||
"requires": {}
|
||||
},
|
||||
"postcss-scss": {
|
||||
"version": "4.0.7",
|
||||
"resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-4.0.7.tgz",
|
||||
"integrity": "sha512-xPv2GseoyXPa58Nro7M73ZntttusuCmZdeOojUFR5PZDz2BR62vfYx1w9TyOnp1+nYFowgOMipsCBhxzVkAEPw==",
|
||||
"version": "4.0.6",
|
||||
"resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-4.0.6.tgz",
|
||||
"integrity": "sha512-rLDPhJY4z/i4nVFZ27j9GqLxj1pwxE80eAzUNRMXtcpipFYIeowerzBgG3yJhMtObGEXidtIgbUpQ3eLDsf5OQ==",
|
||||
"dev": true,
|
||||
"requires": {}
|
||||
},
|
||||
@@ -4456,9 +4446,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"prettier": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz",
|
||||
"integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==",
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.2.tgz",
|
||||
"integrity": "sha512-o2YR9qtniXvwEZlOKbveKfDQVyqxbEIWn48Z8m3ZJjBjcCmUy3xZGIv+7AkaeuaTr6yPXJjwv07ZWlsWbEy1rQ==",
|
||||
"dev": true
|
||||
},
|
||||
"punycode": {
|
||||
@@ -4832,46 +4822,46 @@
|
||||
}
|
||||
},
|
||||
"stylelint-config-recommended": {
|
||||
"version": "13.0.0",
|
||||
"resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-13.0.0.tgz",
|
||||
"integrity": "sha512-EH+yRj6h3GAe/fRiyaoO2F9l9Tgg50AOFhaszyfov9v6ayXJ1IkSHwTxd7lB48FmOeSGDPLjatjO11fJpmarkQ==",
|
||||
"version": "12.0.0",
|
||||
"resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-12.0.0.tgz",
|
||||
"integrity": "sha512-x6x8QNARrGO2sG6iURkzqL+Dp+4bJorPMMRNPScdvaUK8PsynriOcMW7AFDKqkWAS5wbue/u8fUT/4ynzcmqdQ==",
|
||||
"dev": true,
|
||||
"requires": {}
|
||||
},
|
||||
"stylelint-config-recommended-scss": {
|
||||
"version": "13.0.0",
|
||||
"resolved": "https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-13.0.0.tgz",
|
||||
"integrity": "sha512-7AmMIsHTsuwUQm7I+DD5BGeIgCvqYZ4BpeYJJpb1cUXQwrJAKjA+GBotFZgUEGP8lAM+wmd91ovzOi8xfAyWEw==",
|
||||
"version": "12.0.0",
|
||||
"resolved": "https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-12.0.0.tgz",
|
||||
"integrity": "sha512-5Bb2mlGy6WLa30oNeKpZvavv2lowJUsUJO25+OA68GFTemlwd1zbFsL7q0bReKipOSU3sG47hKneZ6Nd+ctrFA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"postcss-scss": "^4.0.7",
|
||||
"stylelint-config-recommended": "^13.0.0",
|
||||
"stylelint-scss": "^5.1.0"
|
||||
"postcss-scss": "^4.0.6",
|
||||
"stylelint-config-recommended": "^12.0.0",
|
||||
"stylelint-scss": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"stylelint-config-standard": {
|
||||
"version": "34.0.0",
|
||||
"resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-34.0.0.tgz",
|
||||
"integrity": "sha512-u0VSZnVyW9VSryBG2LSO+OQTjN7zF9XJaAJRX/4EwkmU0R2jYwmBSN10acqZisDitS0CLiEiGjX7+Hrq8TAhfQ==",
|
||||
"version": "33.0.0",
|
||||
"resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-33.0.0.tgz",
|
||||
"integrity": "sha512-eyxnLWoXImUn77+ODIuW9qXBDNM+ALN68L3wT1lN2oNspZ7D9NVGlNHb2QCUn4xDug6VZLsh0tF8NyoYzkgTzg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"stylelint-config-recommended": "^13.0.0"
|
||||
"stylelint-config-recommended": "^12.0.0"
|
||||
}
|
||||
},
|
||||
"stylelint-config-standard-scss": {
|
||||
"version": "11.0.0",
|
||||
"resolved": "https://registry.npmjs.org/stylelint-config-standard-scss/-/stylelint-config-standard-scss-11.0.0.tgz",
|
||||
"integrity": "sha512-fGE79NBOLg09a9afqGH/guJulRULCaQWWv4cv1v2bMX92B+fGb0y56WqIguwvFcliPmmUXiAhKrrnXilIeXoHA==",
|
||||
"version": "10.0.0",
|
||||
"resolved": "https://registry.npmjs.org/stylelint-config-standard-scss/-/stylelint-config-standard-scss-10.0.0.tgz",
|
||||
"integrity": "sha512-bChBEo1p3xUVWh/wenJI+josoMk21f2yuLDGzGjmKYcALfl2u3DFltY+n4UHswYiXghqXaA8mRh+bFy/q1hQlg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"stylelint-config-recommended-scss": "^13.0.0",
|
||||
"stylelint-config-standard": "^34.0.0"
|
||||
"stylelint-config-recommended-scss": "^12.0.0",
|
||||
"stylelint-config-standard": "^33.0.0"
|
||||
}
|
||||
},
|
||||
"stylelint-scss": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-5.1.0.tgz",
|
||||
"integrity": "sha512-E+KlQFXv1Euha43qw3q+wKBSli557wxbbo6/39DWhRNXlUa9Cz+FYrcgz+PT6ag0l6UisCYjAGCNhoSl4FcwlA==",
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-5.0.1.tgz",
|
||||
"integrity": "sha512-n87iCRZrr2J7//I/QFsDXxFLnHKw633U4qvWZ+mOW6KDAp/HLj06H+6+f9zOuTYy+MdGdTuCSDROCpQIhw5fvQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"postcss-media-query-parser": "^0.2.3",
|
||||
|
@@ -7,9 +7,9 @@
|
||||
"bugs": "https://github.com/just-the-docs/just-the-docs/issues",
|
||||
"devDependencies": {
|
||||
"npm-run-all": "^4.1.5",
|
||||
"prettier": "^3.0.3",
|
||||
"prettier": "^3.0.2",
|
||||
"stylelint": "^15.10.3",
|
||||
"stylelint-config-standard-scss": "^11.0.0"
|
||||
"stylelint-config-standard-scss": "^10.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "npm-run-all --parallel --continue-on-error lint:*",
|
||||
|
Reference in New Issue
Block a user