Repository: patrick-kidger/mkposters
Branch: main
Commit: d181c3397c22
Files: 72
Total size: 267.0 KB
Directory structure:
gitextract_zcs43h_u/
├── .github/
│ ├── FUNDING.yml
│ └── workflows/
│ ├── release.yml
│ └── run_tests.yml
├── .gitignore
├── .pre-commit-config.yaml
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── examples/
│ └── diffrax/
│ └── poster.md
├── mkposters/
│ ├── __init__.py
│ ├── __main__.py
│ ├── _mkposter.py
│ ├── _post_install.py
│ ├── custom.scss
│ ├── join_style.scss
│ └── third_party/
│ ├── icons/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── fontawesome/
│ │ │ └── LICENSE.txt
│ │ ├── material/
│ │ │ └── LICENSE
│ │ └── octicons/
│ │ └── LICENSE
│ └── stylesheets/
│ ├── LICENSE-material-color
│ ├── LICENSE-material-shadows
│ ├── LICENSE-mkdocs-material
│ ├── README.md
│ ├── _config.scss
│ ├── main/
│ │ ├── _colors.scss
│ │ ├── _icons.scss
│ │ ├── _modifiers.scss
│ │ ├── _resets.scss
│ │ ├── _typeset.scss
│ │ ├── extensions/
│ │ │ ├── markdown/
│ │ │ │ ├── _admonition.scss
│ │ │ │ ├── _footnotes.scss
│ │ │ │ └── _toc.scss
│ │ │ └── pymdownx/
│ │ │ ├── _arithmatex.scss
│ │ │ ├── _critic.scss
│ │ │ ├── _details.scss
│ │ │ ├── _emoji.scss
│ │ │ ├── _highlight.scss
│ │ │ ├── _keys.scss
│ │ │ ├── _tabbed.scss
│ │ │ └── _tasklist.scss
│ │ ├── integrations/
│ │ │ └── _mermaid.scss
│ │ └── layout/
│ │ ├── _banner.scss
│ │ ├── _base.scss
│ │ ├── _clipboard.scss
│ │ ├── _content.scss
│ │ ├── _dialog.scss
│ │ ├── _footer.scss
│ │ ├── _form.scss
│ │ ├── _header.scss
│ │ ├── _nav.scss
│ │ ├── _search.scss
│ │ ├── _select.scss
│ │ ├── _sidebar.scss
│ │ ├── _source.scss
│ │ ├── _tabs.scss
│ │ ├── _tag.scss
│ │ ├── _tooltip.scss
│ │ ├── _top.scss
│ │ └── _version.scss
│ ├── main.scss
│ ├── material-color.scss
│ ├── material-shadows.scss
│ ├── palette/
│ │ ├── _accent.scss
│ │ ├── _primary.scss
│ │ └── _scheme.scss
│ ├── palette.scss
│ └── utilities/
│ ├── _break.scss
│ └── _convert.scss
├── pyproject.toml
└── tests/
├── requirements.txt
└── test_example.py
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/FUNDING.yml
================================================
github: [patrick-kidger]
================================================
FILE: .github/workflows/release.yml
================================================
name: Release
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Release
uses: patrick-kidger/action_update_python_project@v2
with:
python-version: "3.11"
test-script: |
cp -r ${{ github.workspace }}/examples ./examples
cp -r ${{ github.workspace }}/tests ./tests
cp ${{ github.workspace }}/pyproject.toml ./pyproject.toml
python -m pip install -r ./tests/requirements.txt
pytest
pypi-token: ${{ secrets.pypi_token }}
github-user: patrick-kidger
github-token: ${{ github.token }}
email-user: ${{ secrets.email_user }}
email-token: ${{ secrets.email_token }}
email-server: ${{ secrets.email_server }}
email-target: ${{ secrets.email_target }}
================================================
FILE: .github/workflows/run_tests.yml
================================================
name: Run tests
on:
pull_request:
jobs:
run-test:
strategy:
matrix:
python-version: [ 3.11 ]
os: [ ubuntu-latest ]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r ./tests/requirements.txt
- name: Checks with pre-commit
uses: pre-commit/action@v2.0.3
- name: Test with pytest
run: |
python -m pip install .
python -m pytest
================================================
FILE: .gitignore
================================================
**/__pycache__
*.egg-info/
build/
dist/
mkposters/third_party/dart-sass/*
================================================
FILE: .pre-commit-config.yaml
================================================
repos:
- repo: https://github.com/ambv/black
rev: 22.3.0
hooks:
- id: black
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.0.255'
hooks:
- id: ruff
- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.305
hooks:
- id: pyright
additional_dependencies: [markdown]
================================================
FILE: CONTRIBUTING.md
================================================
# Contributing
Contributions (pull requests) are very welcome! Here's how to get started.
---
First fork the library on GitHub.
Then clone and install the library in development mode:
```bash
git clone https://github.com/your-username-here/mkposters.git
cd mkposters
pip install -e .
```
Then install the pre-commit hook:
```bash
pip install pre-commit
pre-commit install
```
These hooks use Black and isort to format the code, and flake8 to lint it.
Now make your changes.
Then push your changes back to your fork of the repository:
```bash
git push
```
Finally, open a pull request on GitHub!
================================================
FILE: LICENSE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: README.md
================================================
MkPosters
Create posters using Markdown. Supports icons, admonitions, and LaTeX mathematics.
At the moment it is restricted to the specific layout of two-columns-with-banner-at-the-top, as that's what I tend to use. (Pull requests are welcome if you want to make this tool more general.) The poster can be either portrait or landscape.
The library operates by parsing your Markdown into HTML, styling it with CSS, and then opening a webpage that you can export to PDF.
## Example
The "source code" for this example is [here](https://github.com/patrick-kidger/mkposters/tree/main/examples/diffrax).
## Assumptions
Assumes you have:
- Linux (WSL is fine) or macOS
- Firefox
- Python
Compatibility with other operating systems is probably possible by switching out the version of Dart Sass being used internally.
Compatibility with other browsers is unlikely.
You'll need to be relatively familiar with HTML and (S)CSS to make best use of MkPosters.
## Installation
```
pip install mkposters
```
## Usage instructions
1. Create the appropriate directory structure
```
foo/
poster.md
style.{css,scss} (optional)
...any other assets e.g. images...
```
2. Lay out your poster
`poster.md` should be formatted in three sections, with a literal "`--split--`" between each section.
```
...whatever you want in the banner at the top...
--split--
...whatever you want in the left column...
--split--
...whatever you want in the right column...
```
3. Build poster
Run from the directory containing `foo`:
```
python -m mkposters foo
```
The first time you do this, MkPosters will attempt to detect your system architecture and install the appropriate version of `dart-sass`. This was tested working on both an Apple M1 and an Ubuntu x86_64 machine.
This will also automatically watch the `foo` directory for any updates, and rebuild if necessary.
4. View poster
Now open Firefox (*not* Chrome etc.) and navigate to `localhost:8000`.
What you see will be based on the size of your current browser window and may differ from the PDF version. So next hit `Control-P` and select "Save to PDF". What you see in the print preview is what you'll actually end up with!
Make all your edits until you're happy with the result. Now let's save the result to PDF.
5. Save to PDF
Saving to PDF can be quite finickity, and in general depends on choice of browser etc. (For what it's worth the following is tested using Firefox on Windows 10 with `mkposters` running on Ubuntu 20.04 on WSL2.)
In the print dialog window we opened above:
- Destination: "Save to PDF". **Do not use "Microsoft Print to PDF".**
- Orientation: (portrait or landscape, as desired)
- Pages: Custom: 1
- Paper size: (whatever is desired; current styling works best on paper roughly A4 sized)
- Margins: None
- Options: uncheck "Print headers and footers"
**Once again, make sure you're using Firefox.** Using other browsers (e.g. Chrome) or other PDF exporters (e.g. WeasyPrint) can introduce a variety of issues, such as saving text as images (which are unselectable in the PDF, and appear slightly pixelated), missing parts of the styling, or having faded colours (looking at you, Chrome).
## Functionality
MkPosters comes with a few extra pieces of functionality built in.
#### Icons
Recalling that Markdown can embed HTML, then icons can be embedded via e.g.
```html
```
where the list of available icons is [here](https://github.com/patrick-kidger/mkposters/tree/main/mkposters/third_party/icons).
#### Mathematics
You can use LaTeX-formatted mathematics. This is done via
```
\\(inline math\\)
\\[display math\\]
```
Note the double backslash.
#### Admonitions
Admonitions can be added using the syntax
```markdown
!!! admonition_type "Your title here"
Your text here
```
where `admonition_type` is any of [these](https://squidfunk.github.io/mkdocs-material/reference/admonitions/#supported-types) types, e.g. `info`, `tip`, etc.
#### Custom (S)CSS styling
If you want to style your poster in a custom way, then you can include a `style.css` or `style.scss` file in your poster directory.
#### HTML
The Markdown format allows you use arbitrary HTML inside of it.
- The banner section often contains information (titles, authors, logos, URLs etc.) laid out in complicated ways. Directly writing HTML with embedded `style` attributes is simplest here. [See the start of this example.](https://raw.githubusercontent.com/patrick-kidger/mkposters/main/examples/diffrax/poster.md)
- HTML can be (ab)used to modify spacing like so. (Analogous to those little `\vspace`s you definitely never use in LaTeX documents.) In this example we move the content up by 10 points.
```
...your content here...
```
## Future plans?
It'd be nice to support:
- Other poster layouts, e.g. multiple columns;
- Optionally automatically generating the PDF. (Practically speaking probably by automating the Firefox interaction through Selenium.)
- Reducing package size by not including all of the `mkposters/third_party/icons` directory by default?
Pull requests welcome! See [CONTRIBUTING.md](https://github.com/patrick-kidger/mkposters/blob/main/CONTRIBUTING.md).
## Similar tools
These all support some kind of conversion Markdown -> something.
- For documentation: [MkDocs](https://github.com/mkdocs/mkdocs/) with [mkdocs-material](https://github.com/squidfunk/mkdocs-material/).
- For presentations: [reveal.js](https://github.com/hakimel/reveal.js)
- For static sites: [Hugo](https://github.com/gohugoio/hugo) or [Jekyll](https://github.com/jekyll/jekyll)
================================================
FILE: examples/diffrax/poster.md
================================================
--split--
!!! abstract "Summary of features"
- Ordinary/stochastic/controlled diffeq solvers;
- High-order, implicit, symplectic solvers;
- Using a PyTree as the state;
- Dense solutions;
- Multiple adjoint methods for backpropagation.
## Easy-to-use syntax
Let's solve the ODE \\(\frac{\mathrm{d}y}{\mathrm{d}t} = -y\\):
```python
from diffrax import diffeqsolve, ODETerm, Dopri5
import jax.numpy as jnp
def f(t, y, args):
return -y
term = ODETerm(f)
solver = Dopri5()
solution = diffeqsolve(term, solver, t0=0, t1=1, dt0=0.1,
y0=jnp.array([2., 3.]))
```
## New idea: unified solving
At a technical level, the internal structure of the library does some pretty cool new stuff! Most important is the idea of solving ODEs and SDEs in a single unified way; this produces a small tightly-written library.
Specifically: ordinary differential equations
\\[\frac{\mathrm{d}y}{\mathrm{d}t} = f(t, y(t))\\]
and stochastic differential equations
\\[\mathrm{d}y(t) = f_1(t, y(t))\,\mathrm{d}t + f_2(t, y(t))\,\mathrm{d}w(t)\\]
are solved in a unified way by lowering them to *controlled* diffeqs:
\\[\mathrm{d}y(t) = f(t, y(t)) \,\mathrm{d}x(t).\\]
where e.g. \\(x(t) = t\\) for an ODE and \\(x(t) = [t, w(t)]\\) for an SDE.
--split--
## Versus other libraries? (torchdiffeq, Julia etc.)
Diffrax is better for advanced use cases:
- Adding your own custom ops;
- Solving ODEs/SDEs simultaneously;
- Solving SDEs with controls, or multiple noise terms.
- etc.
Diffrax is also *fast*.
- 1.3--20 times faster than torchdiffeq.
- Similar speed to DifferentialEquations.jl (precise benchmarks WIP).
## Extending Diffrax
Diffrax is designed to be highly extensible.
- There are a sophisticated collection of abstract base classes (`AbstractSolver` etc.) through which you can easily add custom ops.
- If you're writing e.g. a differentiable simulator and want to step through the solve yourself, then this is also possible.
!!! tip "Next steps"
**Installation:** `pip install diffrax`
**Documentation:** [https://docs.kidger.site/diffrax](https://docs.kidger.site/diffrax)
**Reference:**
P. Kidger, *On Neural Differential Equations*, Doctoral Thesis, University of Oxford 2021
""" # noqa: E501
# check if post-install of dart-sass is needed
if not (_here / "third_party" / "dart-sass" / "SASSBUILT.txt").exists():
post_install(package_dir=str(_here))
subprocess.run(
[
f"{_here}/third_party/dart-sass/sass",
str(join_scss_file),
str(css_file),
"--no-source-map",
]
)
with css_file.open() as f:
css_out = f.read()
def svg_load_fn(match):
(filename,) = match.groups()
with pathlib.Path(_here / "third_party" / "icons" / filename).open() as f:
contents = f.read()
return f"url('data:image/svg+xml;charset=utf-8,{contents}')"
svg_load_re = re.compile(r"""svg-load\(["']([\w\.\-/]+)["']\)""")
css_out = svg_load_re.sub(svg_load_fn, css_out)
with css_file.open("w") as f:
f.write(css_out)
with html_file.open("w") as f:
f.write(html_out)
def _max_file_time(path: pathlib.Path) -> int:
times = []
for subpath in path.iterdir():
if not subpath.match(".*"):
if subpath.is_file():
times.append(subpath.stat().st_mtime_ns)
elif subpath.is_dir():
times.append(_max_file_time(subpath))
return max(times)
def mkposter(datadir: Union[str, pathlib.Path], timeout_s: Optional[int] = None):
with tempfile.TemporaryDirectory() as tempdir:
tempdir = pathlib.Path(tempdir)
datadir = pathlib.Path(datadir)
(tempdir / "style.scss").touch() # default
join_scss_file = tempdir / "join_style.scss"
shutil.copyfile(_here / "join_style.scss", join_scss_file)
shutil.copyfile(_here / "custom.scss", tempdir / "custom.scss")
(tempdir / "stylesheets").symlink_to(
_here / "third_party" / "stylesheets", target_is_directory=True
)
(tempdir / "icons").symlink_to(
_here / "third_party" / "icons", target_is_directory=True
)
start_time = time.time()
file_time = last_time = _max_file_time(datadir)
need_update = True
keep_running = True
process = None
try:
while keep_running:
if need_update:
last_time = file_time
_parse(datadir, tempdir, join_scss_file)
if process is None:
print("Starting")
else:
print("Detected change; reloading")
process.kill()
process = subprocess.Popen(
["python", "-m", "http.server"], cwd=tempdir
)
time.sleep(0.1) # check every tenth of a second
file_time = _max_file_time(datadir)
need_update = file_time > last_time
if timeout_s is not None:
keep_running = time.time() < start_time + timeout_s
except KeyboardInterrupt:
pass
finally:
if process is not None:
process.kill()
================================================
FILE: mkposters/_post_install.py
================================================
import pathlib
import subprocess
def post_install(package_dir: str, sass_release: str = "1.50.1"):
"""
Run post-install of dart-sass.
Detect the compute architecture (linux-arm64, linux-x64, macos-arm64, macos-x64) and download the appropriate distribution release of dart-sass.
See also: https://github.com/sass/dart-sass/releases
Args:
package_dir (str): The location of `mkposters`. This is the directory that contains the `third_party` folder which dart-sass should be installed in.
sass_release (str): The release version of sass to download.
Returns:
None
""" # noqa: E501
sass_dir = pathlib.Path(package_dir) / "third_party"
bash_cmd = f"""
# Detect the compute architecture (linux-arm64, macos-arm64, macos-x64) and download the appropriate distribution release of dart-sass
# https://github.com/sass/dart-sass/releases/tag/1.50.1
arch=$(uname -m)
kernel=$(uname -s)
echo Detected architecture: $arch and kernel: $kernel.
if [[ "$arch" =~ ^(arm64|aarch64)$ ]] && [ "$kernel" = "Linux" ]; then
curl -sL "https://github.com/sass/dart-sass/releases/download/{sass_release}/dart-sass-{sass_release}-linux-arm64.tar.gz" > {sass_dir}/dart.tar.gz && tar -xzf {sass_dir}/dart.tar.gz --directory {sass_dir} && rm {sass_dir}/dart.tar.gz && chmod 755 {sass_dir}/dart-sass/sass
echo "Downloaded https://github.com/sass/dart-sass/releases/download/{sass_release}/dart-sass-{sass_release}-linux-arm64.tar.gz \nSee also:\nhttps://sass-lang.com/install\ninstalled version: {sass_release}" > "{sass_dir}/dart-sass/SASSBUILT.txt"
elif [ "$arch" = "x86_64" ] && [ "$kernel" = "Linux" ]; then
curl -sL "https://github.com/sass/dart-sass/releases/download/{sass_release}/dart-sass-{sass_release}-linux-x64.tar.gz" > {sass_dir}/dart.tar.gz && tar -xzf {sass_dir}/dart.tar.gz --directory {sass_dir} && rm {sass_dir}/dart.tar.gz && chmod 755 {sass_dir}/dart-sass/sass
echo "Downloaded https://github.com/sass/dart-sass/releases/download/{sass_release}/dart-sass-{sass_release}-linux-x64.tar.gz \nSee also:\nhttps://sass-lang.com/install\ninstalled version: {sass_release}" > "{sass_dir}/dart-sass/SASSBUILT.txt"
elif [ "$arch" = "arm64" ] && [ "$kernel" = "Darwin" ]; then
curl -sL "https://github.com/sass/dart-sass/releases/download/{sass_release}/dart-sass-{sass_release}-macos-arm64.tar.gz" > {sass_dir}/dart.tar.gz && tar -xzf {sass_dir}/dart.tar.gz --directory {sass_dir} && rm {sass_dir}/dart.tar.gz && chmod 755 {sass_dir}/dart-sass/sass
echo "Downloaded https://github.com/sass/dart-sass/releases/download/{sass_release}/dart-sass-{sass_release}-macos-arm64.tar.gz \nSee also:\nhttps://sass-lang.com/install\ninstalled version: {sass_release}" > "{sass_dir}/dart-sass/SASSBUILT.txt"
elif [ "$arch" = "x86_64" ] && [ "$kernel" = "Darwin" ]; then
curl -sL "https://github.com/sass/dart-sass/releases/download/{sass_release}/dart-sass-{sass_release}-macos-x64.tar.gz" > {sass_dir}/dart.tar.gz && tar -xzf {sass_dir}/dart.tar.gz --directory {sass_dir} && rm {sass_dir}/dart.tar.gz && chmod 755 {sass_dir}/dart-sass/sass
echo "Downloaded https://github.com/sass/dart-sass/releases/download/{sass_release}/dart-sass-{sass_release}-macos-x64.tar.gz \nSee also:\nhttps://sass-lang.com/install\ninstalled version: {sass_release}" > "{sass_dir}/dart-sass/SASSBUILT.txt"
else
echo "Unsupported architecture: $arch and kernel: $kernel"
fi
""" # noqa: E501
with subprocess.Popen(
bash_cmd,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
bufsize=0,
close_fds=True,
shell=True,
executable="/bin/bash",
) as proc:
if proc.stdout:
with proc.stdout:
for line in iter(proc.stdout.readline, b""):
print(line.decode().rstrip())
exit_code = proc.wait()
if exit_code != 0:
raise Exception(f"post_install.py failed with exit code {exit_code}")
================================================
FILE: mkposters/custom.scss
================================================
:root {
--md-text-font: "Roboto";
}
html {
font-size: 110%;
}
.md-typeset :is(.admonition, details) {
font-size: 0.8rem;
}
.banner {
display: flex;
align-items: center;
margin: 20pt 25pt 10pt 25pt;
:is(h1, h2, h3, h4, h5, h6) {
margin: 0;
}
h1 {
color: #000;
}
}
.body {
display: flex;
margin: 5pt 25pt 20pt 25pt;
.left {
flex: 0 0 calc(50% - 12.5pt);
margin-right: 25pt;
}
.right {
flex: 1;
}
}
hr {
border-bottom-width: 1pt !important;
border-bottom-style: solid !important;
height: 0;
margin: 0;
}
.md-typeset ul li {
margin-bottom: 0;
}
================================================
FILE: mkposters/join_style.scss
================================================
@import "stylesheets/main";
@import "custom";
@import "style";
================================================
FILE: mkposters/third_party/icons/LICENSE
================================================
Copyright (c) 2016-2022 Martin Donath
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
================================================
FILE: mkposters/third_party/icons/README.md
================================================
Copied from:
https://github.com/squidfunk/mkdocs-material/tree/master/material/.icons
================================================
FILE: mkposters/third_party/icons/fontawesome/LICENSE.txt
================================================
Fonticons, Inc. (https://fontawesome.com)
--------------------------------------------------------------------------------
Font Awesome Free License
Font Awesome Free is free, open source, and GPL friendly. You can use it for
commercial projects, open source projects, or really almost whatever you want.
Full Font Awesome Free license: https://fontawesome.com/license/free.
--------------------------------------------------------------------------------
# Icons: CC BY 4.0 License (https://creativecommons.org/licenses/by/4.0/)
The Font Awesome Free download is licensed under a Creative Commons
Attribution 4.0 International License and applies to all icons packaged
as SVG and JS file types.
--------------------------------------------------------------------------------
# Fonts: SIL OFL 1.1 License
In the Font Awesome Free download, the SIL OFL license applies to all icons
packaged as web and desktop font files.
Copyright (c) 2022 Fonticons, Inc. (https://fontawesome.com)
with Reserved Font Name: "Font Awesome".
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
SIL OPEN FONT LICENSE
Version 1.1 - 26 February 2007
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting — in part or in whole — any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
--------------------------------------------------------------------------------
# Code: MIT License (https://opensource.org/licenses/MIT)
In the Font Awesome Free download, the MIT license applies to all non-font and
non-icon files.
Copyright 2022 Fonticons, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in the
Software without restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
# Attribution
Attribution is required by MIT, SIL OFL, and CC BY licenses. Downloaded Font
Awesome Free files already contain embedded comments with sufficient
attribution, so you shouldn't need to do anything additional when using these
files normally.
We've kept attribution comments terse, so we ask that you do not actively work
to remove them from files, especially code. They're a great way for folks to
learn about Font Awesome.
--------------------------------------------------------------------------------
# Brand Icons
All brand icons are trademarks of their respective owners. The use of these
trademarks does not indicate endorsement of the trademark holder by Font
Awesome, nor vice versa. **Please do not use brand logos for any purpose except
to represent the company, product, or service to which they refer.**
================================================
FILE: mkposters/third_party/icons/material/LICENSE
================================================
Pictogrammers Free License
--------------------------
This icon collection is released as free, open source, and GPL friendly by
the [Pictogrammers](http://pictogrammers.com/) icon group. You may use it
for commercial projects, open source projects, or anything really.
# Icons: Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0)
Some of the icons are redistributed under the Apache 2.0 license. All other
icons are either redistributed under their respective licenses or are
distributed under the Apache 2.0 license.
# Fonts: Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0)
All web and desktop fonts are distributed under the Apache 2.0 license. Web
and desktop fonts contain some icons that are redistributed under the Apache
2.0 license. All other icons are either redistributed under their respective
licenses or are distributed under the Apache 2.0 license.
# Code: MIT (https://opensource.org/licenses/MIT)
The MIT license applies to all non-font and non-icon files.
================================================
FILE: mkposters/third_party/icons/octicons/LICENSE
================================================
MIT License
Copyright (c) 2022 GitHub Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: mkposters/third_party/stylesheets/LICENSE-material-color
================================================
The MIT License (MIT)
Copyright (c) Denis Malinochkin
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: mkposters/third_party/stylesheets/LICENSE-material-shadows
================================================
The MIT License (MIT)
Copyright (c) Denis Malinochkin
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: mkposters/third_party/stylesheets/LICENSE-mkdocs-material
================================================
Copyright (c) 2016-2022 Martin Donath
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
================================================
FILE: mkposters/third_party/stylesheets/README.md
================================================
Copied from:
https://github.com/squidfunk/mkdocs-material/tree/master/src/assets/stylesheets
https://github.com/mrmlnc/material-color/blob/master/material-color.scss
https://github.com/mrmlnc/material-shadows/blob/master/material-shadows.scss
These are covered by the following licenses, respectively:
LICENSE-mkdocs-material
LICENSE-material-color
LICENSE-material-shadows
================================================
FILE: mkposters/third_party/stylesheets/_config.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Variables: breakpoints
// ----------------------------------------------------------------------------
// Device-specific breakpoints
$break-devices: (
mobile: (
portrait: px2em(220px) px2em(479px),
landscape: px2em(480px) px2em(719px)
),
tablet: (
portrait: px2em(720px) px2em(959px),
landscape: px2em(960px) px2em(1219px)
),
screen: (
small: px2em(1220px) px2em(1599px),
medium: px2em(1600px) px2em(1999px),
large: px2em(2000px)
)
);
================================================
FILE: mkposters/third_party/stylesheets/main/_colors.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Rules
// ----------------------------------------------------------------------------
// Color variables
:root {
// Default color shades
--md-default-fg-color: hsla(0, 0%, 0%, 0.87);
--md-default-fg-color--light: hsla(0, 0%, 0%, 0.54);
--md-default-fg-color--lighter: hsla(0, 0%, 0%, 0.32);
--md-default-fg-color--lightest: hsla(0, 0%, 0%, 0.07);
--md-default-bg-color: hsla(0, 0%, 100%, 1);
--md-default-bg-color--light: hsla(0, 0%, 100%, 0.7);
--md-default-bg-color--lighter: hsla(0, 0%, 100%, 0.3);
--md-default-bg-color--lightest: hsla(0, 0%, 100%, 0.12);
// Primary color shades
--md-primary-fg-color: hsla(#{hex2hsl($clr-indigo-500)}, 1);
--md-primary-fg-color--light: hsla(#{hex2hsl($clr-indigo-400)}, 1);
--md-primary-fg-color--dark: hsla(#{hex2hsl($clr-indigo-700)}, 1);
--md-primary-bg-color: hsla(0, 0%, 100%, 1);
--md-primary-bg-color--light: hsla(0, 0%, 100%, 0.7);
// Accent color shades
--md-accent-fg-color: hsla(#{hex2hsl($clr-indigo-a200)}, 1);
--md-accent-fg-color--transparent: hsla(#{hex2hsl($clr-indigo-a200)}, 0.1);
--md-accent-bg-color: hsla(0, 0%, 100%, 1);
--md-accent-bg-color--light: hsla(0, 0%, 100%, 0.7);
// Light theme (default)
> * {
// Code color shades
--md-code-fg-color: hsla(200, 18%, 26%, 1);
--md-code-bg-color: hsla(0, 0%, 96%, 1);
// Code highlighting color shades
--md-code-hl-color: hsla(#{hex2hsl($clr-yellow-a200)}, 0.5);
--md-code-hl-number-color: hsla(0, 67%, 50%, 1);
--md-code-hl-special-color: hsla(340, 83%, 47%, 1);
--md-code-hl-function-color: hsla(291, 45%, 50%, 1);
--md-code-hl-constant-color: hsla(250, 63%, 60%, 1);
--md-code-hl-keyword-color: hsla(219, 54%, 51%, 1);
--md-code-hl-string-color: hsla(150, 63%, 30%, 1);
--md-code-hl-name-color: var(--md-code-fg-color);
--md-code-hl-operator-color: var(--md-default-fg-color--light);
--md-code-hl-punctuation-color: var(--md-default-fg-color--light);
--md-code-hl-comment-color: var(--md-default-fg-color--light);
--md-code-hl-generic-color: var(--md-default-fg-color--light);
--md-code-hl-variable-color: var(--md-default-fg-color--light);
// Typeset color shades
--md-typeset-color: var(--md-default-fg-color);
// Typeset `a` color shades
--md-typeset-a-color: var(--md-primary-fg-color);
// Typeset `mark` color shades
--md-typeset-mark-color: hsla(#{hex2hsl($clr-yellow-a200)}, 0.5);
// Typeset `del` and `ins` color shades
--md-typeset-del-color: hsla(6, 90%, 60%, 0.15);
--md-typeset-ins-color: hsla(150, 90%, 44%, 0.15);
// Typeset `kbd` color shades
--md-typeset-kbd-color: hsla(0, 0%, 98%, 1);
--md-typeset-kbd-accent-color: hsla(0, 100%, 100%, 1);
--md-typeset-kbd-border-color: hsla(0, 0%, 72%, 1);
// Typeset `table` color shades
--md-typeset-table-color: hsla(0, 0%, 0%, 0.12);
// Admonition color shades
--md-admonition-fg-color: var(--md-default-fg-color);
--md-admonition-bg-color: var(--md-default-bg-color);
// Footer color shades
--md-footer-fg-color: hsla(0, 0%, 100%, 1);
--md-footer-fg-color--light: hsla(0, 0%, 100%, 0.7);
--md-footer-fg-color--lighter: hsla(0, 0%, 100%, 0.3);
--md-footer-bg-color: hsla(0, 0%, 0%, 0.87);
--md-footer-bg-color--dark: hsla(0, 0%, 0%, 0.32);
}
// Shadow depth 1
--md-shadow-z1:
0 #{px2rem(4px)} #{px2rem(10px)} hsla(0, 0%, 0%, 0.05),
0 0 #{px2rem(1px)} hsla(0, 0%, 0%, 0.1);
// Shadow depth 2
--md-shadow-z2:
0 #{px2rem(4px)} #{px2rem(10px)} hsla(0, 0%, 0%, 0.1),
0 0 #{px2rem(1px)} hsla(0, 0%, 0%, 0.25);
// Shadow depth 3
--md-shadow-z3:
0 #{px2rem(4px)} #{px2rem(10px)} hsla(0, 0%, 0%, 0.2),
0 0 #{px2rem(1px)} hsla(0, 0%, 0%, 0.35);
}
================================================
FILE: mkposters/third_party/stylesheets/main/_icons.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Rules
// ----------------------------------------------------------------------------
// Icon
.md-icon {
// SVG defaults
svg {
display: block;
width: px2rem(24px);
height: px2rem(24px);
fill: currentcolor;
}
}
================================================
FILE: mkposters/third_party/stylesheets/main/_modifiers.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Rules
// ----------------------------------------------------------------------------
// Scoped in typesetted content to match specificity of regular content
.md-typeset {
// [tablet +]: Allow for rendering content as sidebars
@include break-from-device(tablet) {
// Modifier to float block elements
.inline {
float: left;
width: px2rem(234px);
margin-top: 0;
margin-inline-end: px2rem(16px);
margin-bottom: px2rem(16px);
// Adjust for right-to-left languages
[dir="rtl"] & {
float: right;
}
// Modifier to move to end (ltr: right, rtl: left)
&.end {
float: right;
margin-inline: px2rem(16px) 0;
// Adjust for right-to-left languages
[dir="rtl"] & {
float: left;
}
}
}
}
}
================================================
FILE: mkposters/third_party/stylesheets/main/_resets.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Rules
// ----------------------------------------------------------------------------
// Enforce correct box model and prevent adjustments of font size after
// orientation changes in IE and iOS
html {
box-sizing: border-box;
text-size-adjust: none;
}
// All elements shall inherit the document default
*,
*::before,
*::after {
box-sizing: inherit;
// [reduced motion]: Disable all transitions
@media (prefers-reduced-motion) {
transition: none !important; // stylelint-disable-line
}
}
// Remove margin in all browsers
body {
margin: 0;
}
// Reset tap outlines on iOS and Android
a,
button,
label,
input {
-webkit-tap-highlight-color: transparent;
}
// Reset link styles
a {
color: inherit;
text-decoration: none;
}
// Normalize horizontal separator styles
hr {
display: block;
box-sizing: content-box;
height: px2rem(1px);
padding: 0;
overflow: visible;
border: 0;
}
// Normalize font-size in all browsers
small {
font-size: 80%;
}
// Prevent subscript and superscript from affecting line-height
sub,
sup {
line-height: 1em;
}
// Remove border on image
img {
border-style: none;
}
// Reset table styles
table {
border-collapse: separate;
border-spacing: 0;
}
// Reset table cell styles
td,
th {
font-weight: 400;
vertical-align: top;
}
// Reset button styles
button {
margin: 0;
padding: 0;
font-size: inherit;
font-family: inherit;
background: transparent;
border: 0;
}
// Reset input styles
input {
border: 0;
outline: none;
}
================================================
FILE: mkposters/third_party/stylesheets/main/_typeset.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Rules: font definitions
// ----------------------------------------------------------------------------
// Enable font-smoothing in Webkit and FF
body {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
// Font with fallback for body copy
--md-text-font-family:
var(--md-text-font, _),
-apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
// Font with fallback for code
--md-code-font-family:
var(--md-code-font, _),
SFMono-Regular, Consolas, Menlo, monospace;
}
// Define default fonts
body,
input {
color: var(--md-typeset-color);
font-feature-settings: "kern", "liga";
font-family: var(--md-text-font-family);
}
// Define monospaced fonts
code,
pre,
kbd {
color: var(--md-typeset-color);
font-feature-settings: "kern";
font-family: var(--md-code-font-family);
}
// ----------------------------------------------------------------------------
// Rules: typesetted content
// ----------------------------------------------------------------------------
// General variables
:root {
--md-typeset-table-sort-icon: svg-load("material/sort.svg");
--md-typeset-table-sort-icon--asc: svg-load("material/sort-ascending.svg");
--md-typeset-table-sort-icon--desc: svg-load("material/sort-descending.svg");
}
// ----------------------------------------------------------------------------
// Content that is typeset - if possible, all margins, paddings and font sizes
// should be set in ems, so nested blocks (e.g. admonitions) render correctly.
.md-typeset {
font-size: px2rem(16px);
line-height: 1.6;
color-adjust: exact;
// [print]: We'll use a smaller `font-size` for printing, so code examples
// don't break too early, and `16px` looks too big anyway.
@media print {
font-size: px2rem(13.6px);
}
// Default spacing
ul,
ol,
dl,
figure,
blockquote,
pre {
margin-block: 1em;
}
// Headline on level 1
h1 {
margin: 0 0 px2em(40px, 32px);
color: var(--md-default-fg-color--light);
font-weight: 300;
font-size: px2em(32px);
line-height: 1.3;
letter-spacing: -0.01em;
}
// Headline on level 2
h2 {
margin: px2em(40px, 25px) 0 px2em(16px, 25px);
font-weight: 300;
font-size: px2em(25px);
line-height: 1.4;
letter-spacing: -0.01em;
}
// Headline on level 3
h3 {
margin: px2em(32px, 20px) 0 px2em(16px, 20px);
font-weight: 400;
font-size: px2em(20px);
line-height: 1.5;
letter-spacing: -0.01em;
}
// Headline on level 3 following level 2
h2 + h3 {
margin-top: px2em(16px, 20px);
}
// Headline on level 4
h4 {
margin: px2em(16px) 0;
font-weight: 700;
letter-spacing: -0.01em;
}
// Headline on level 5-6
h5,
h6 {
margin: px2em(16px, 12.8px) 0;
color: var(--md-default-fg-color--light);
font-weight: 700;
font-size: px2em(12.8px);
letter-spacing: -0.01em;
}
// Headline on level 5
h5 {
text-transform: uppercase;
}
// Horizontal separator
hr {
display: flow-root;
margin: 1.5em 0;
border-bottom: px2rem(1px) solid var(--md-default-fg-color--lightest);
}
// Text link
a {
color: var(--md-typeset-a-color);
word-break: break-word;
// Also enable color transition on pseudo elements
&,
&::before {
transition: color 125ms;
}
// Text link on focus/hover
&:focus,
&:hover {
color: var(--md-accent-fg-color);
}
// Show outline for keyboard devices
&.focus-visible {
outline-color: var(--md-accent-fg-color);
outline-offset: px2rem(4px);
}
}
// Code block
code,
pre,
kbd {
color: var(--md-code-fg-color);
direction: ltr;
// [print]: Wrap text and hide scollbars
@media print {
white-space: pre-wrap;
}
}
// Inline code block
code {
padding: 0 px2em(4px, 13.6px);
font-size: px2em(13.6px);
word-break: break-word;
background-color: var(--md-code-bg-color);
border-radius: px2rem(2px);
box-decoration-break: clone;
// Hide outline for pointer devices
&:not(.focus-visible) {
outline: none;
-webkit-tap-highlight-color: transparent;
}
}
// Ensure link color in code blocks
a code {
color: currentcolor;
}
// Unformatted content
pre {
position: relative;
display: flow-root;
line-height: 1.4;
// Code block
> code {
display: block;
margin: 0;
padding: px2em(10.5px, 13.6px) px2em(16px, 13.6px);
overflow: auto;
word-break: normal;
outline-color: var(--md-accent-fg-color);
box-shadow: none;
box-decoration-break: slice;
touch-action: auto;
scrollbar-width: thin;
scrollbar-color: var(--md-default-fg-color--lighter) transparent;
// Code block on hover
&:hover {
scrollbar-color: var(--md-accent-fg-color) transparent;
}
// Webkit scrollbar
&::-webkit-scrollbar {
width: px2rem(4px);
height: px2rem(4px);
}
// Webkit scrollbar thumb
&::-webkit-scrollbar-thumb {
background-color: var(--md-default-fg-color--lighter);
// Webkit scrollbar thumb on hover
&:hover {
background-color: var(--md-accent-fg-color);
}
}
}
}
// Keyboard key
kbd {
display: inline-block;
padding: 0 px2em(8px, 12px);
color: var(--md-default-fg-color);
font-size: px2em(12px);
vertical-align: text-top;
word-break: break-word;
background-color: var(--md-typeset-kbd-color);
border-radius: px2rem(2px);
box-shadow:
0 px2rem(2px) 0 px2rem(1px) var(--md-typeset-kbd-border-color),
0 px2rem(2px) 0 var(--md-typeset-kbd-border-color),
0 px2rem(-2px) px2rem(4px) var(--md-typeset-kbd-accent-color) inset;
}
// Text highlighting marker
mark {
color: inherit;
word-break: break-word;
background-color: var(--md-typeset-mark-color);
box-decoration-break: clone;
}
// Abbreviation
abbr {
text-decoration: none;
border-bottom: px2rem(1px) dotted var(--md-default-fg-color--light);
cursor: help;
// Show tooltip for touch devices
@media (hover: none) {
position: relative;
// Tooltip
&[title]:is(:focus, :hover)::after {
position: absolute;
inset-inline-start: 0;
display: inline-block;
width: auto;
min-width: max-content;
max-width: 80%;
margin-top: 2em;
padding: px2rem(4px) px2rem(6px);
color: var(--md-default-bg-color);
font-size: px2rem(14px);
background-color: var(--md-default-fg-color);
border-radius: px2rem(2px);
box-shadow: var(--md-shadow-z3);
content: attr(title);
}
}
}
// Small text
small {
opacity: 0.75;
}
// Superscript and subscript
sup,
sub {
margin-inline-start: px2em(1px, 12.8px);
}
// Blockquotes, possibly nested
blockquote {
padding-inline-start: px2rem(12px);
margin-inline: 0;
color: var(--md-default-fg-color--light);
border-inline-start: px2rem(4px) solid var(--md-default-fg-color--lighter);
}
// Unordered list
ul {
list-style-type: disc;
}
// Unordered and ordered list
ul,
ol {
margin-inline-start: px2em(10px);
padding: 0;
// Adjust display mode if not hidden
&:not([hidden]) {
display: flow-root;
}
// Nested ordered list
ol {
list-style-type: lower-alpha;
// Triply nested ordered list
ol {
list-style-type: lower-roman;
}
}
// List element
li {
margin-bottom: 0.5em;
margin-inline-start: px2em(20px);
// Adjust spacing
:is(p, blockquote) {
margin: 0.5em 0;
}
// Adjust spacing on last child
&:last-child {
margin-bottom: 0;
}
// Nested list
:is(ul, ol) {
margin-block: 0.5em;
margin-inline-start: px2em(10px);
}
}
}
// Definition list
dd {
margin-block: 1em 1.5em;
margin-inline-start: px2em(30px);
}
// Image or icon
img,
svg {
max-width: 100%;
height: auto;
// Adjust spacing when left-aligned
&[align="left"] {
margin: 1em;
margin-left: 0;
}
// Adjust spacing when right-aligned
&[align="right"] {
margin: 1em;
margin-right: 0;
}
// Adjust spacing when sole children
&[align]:only-child {
margin-top: 0;
}
}
// Hide images for dark mode
img[src$="#only-dark"] {
display: none;
}
// Figure
figure {
display: flow-root;
width: fit-content;
max-width: 100%;
margin: 1em auto;
text-align: center;
// Figure images
img {
display: block;
}
}
// Figure caption
figcaption {
max-width: px2rem(480px);
margin: 1em auto;
font-style: italic;
}
// Limit width to container
iframe {
max-width: 100%;
}
// Data table
table:not([class]) {
display: inline-block;
max-width: 100%;
overflow: auto;
font-size: px2rem(12.8px);
background-color: var(--md-default-bg-color);
border: px2rem(1px) solid var(--md-typeset-table-color);
border-radius: px2rem(2px);
touch-action: auto;
// [print]: Reset display mode so table header wraps when printing
@media print {
display: table;
}
// Due to margin collapse because of the necessary inline-block hack, we
// cannot increase the bottom margin on the table, so we just increase the
// top margin on the following element
+ * {
margin-top: 1.5em;
}
// Elements in table heading and cell
:is(th, td) > * {
// Adjust spacing on first child
&:first-child {
margin-top: 0;
}
// Adjust spacing on last child
&:last-child {
margin-bottom: 0;
}
}
// Table heading and cell
:is(th, td):not([align]) {
text-align: left;
// Adjust for right-to-left languages
[dir="rtl"] & {
text-align: right;
}
}
// Table heading
th {
min-width: px2rem(100px);
padding: px2em(12px, 12.8px) px2em(16px, 12.8px);
font-weight: 700;
vertical-align: top;
// Links in table headings
a {
color: inherit;
}
}
// Table cell
td {
padding: px2em(12px, 12.8px) px2em(16px, 12.8px);
vertical-align: top;
border-top: px2rem(1px) solid var(--md-typeset-table-color);
}
// Table body row
tbody tr {
transition: background-color 125ms;
// Table row on hover
&:hover {
background-color: rgba(0, 0, 0, 0.035);
box-shadow: 0 px2rem(1px) 0 var(--md-default-bg-color) inset;
}
}
// Text link in table
a {
word-break: normal;
}
}
// Sortable table
table th[role="columnheader"] {
cursor: pointer;
// Sort icon
&::after {
display: inline-block;
width: 1.2em;
height: 1.2em;
margin-inline-start: 0.5em;
vertical-align: text-bottom;
mask-image: var(--md-typeset-table-sort-icon);
mask-repeat: no-repeat;
mask-size: contain;
transition: background-color 125ms;
content: "";
}
// Show sort icon on hover
&:hover::after {
background-color: var(--md-default-fg-color--lighter);
}
// Sort ascending icon
&[aria-sort="ascending"]::after {
background-color: var(--md-default-fg-color--light);
mask-image: var(--md-typeset-table-sort-icon--asc);
}
// Sort descending icon
&[aria-sort="descending"]::after {
background-color: var(--md-default-fg-color--light);
mask-image: var(--md-typeset-table-sort-icon--desc);
}
}
// Data table scroll wrapper
&__scrollwrap {
margin: 1em px2rem(-16px);
overflow-x: auto;
touch-action: auto;
}
// Data table wrapper
&__table {
display: inline-block;
margin-bottom: 0.5em;
padding: 0 px2rem(16px);
// [print]: Reset display mode so table header wraps when printing
@media print {
display: block;
}
// Data table
html & table {
display: table;
width: 100%;
margin: 0;
overflow: hidden;
}
}
}
// ----------------------------------------------------------------------------
// Rules: top-level
// ----------------------------------------------------------------------------
// [mobile -]: Align with body copy
@include break-to-device(mobile) {
// Top-level unformatted content
.md-content__inner > pre {
margin: 1em px2rem(-16px);
// Code block
code {
border-radius: 0;
}
}
}
================================================
FILE: mkposters/third_party/stylesheets/main/extensions/markdown/_admonition.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
@use "sass:color";
@use "sass:list";
// ----------------------------------------------------------------------------
// Variables
// ----------------------------------------------------------------------------
/// Admonition flavours
$admonitions: (
note: pencil $clr-blue-a200,
abstract summary tldr: clipboard-text $clr-light-blue-a400,
info todo: information $clr-cyan-a700,
tip hint important: fire $clr-teal-a700,
success check done: check-bold $clr-green-a700,
question help faq: help-circle $clr-light-green-a700,
warning caution attention: alert $clr-orange-a400,
failure fail missing: close-thick $clr-red-a200,
danger error: lightning-bolt $clr-red-a400,
bug: bug $clr-pink-a400,
example: format-list-numbered $clr-deep-purple-a200,
quote cite: format-quote-close $clr-grey
) !default;
// ----------------------------------------------------------------------------
// Rules: layout
// ----------------------------------------------------------------------------
// Admonition variables
:root {
@each $names, $props in $admonitions {
--md-admonition-icon--#{nth($names, 1)}:
svg-load("material/#{nth($props, 1)}.svg");
}
}
// ----------------------------------------------------------------------------
// Scoped in typesetted content to match specificity of regular content
.md-typeset {
// Admonition - note that all styles also apply to details tags, which are
// rendered as collapsible admonitions with summary elements as titles.
:is(.admonition, details) {
display: flow-root;
margin: px2em(20px, 12.8px) 0;
padding: 0 px2rem(12px);
color: var(--md-admonition-fg-color);
font-size: px2rem(12.8px);
page-break-inside: avoid;
background-color: var(--md-admonition-bg-color);
border: 0 solid $clr-blue-a200;
border-inline-start-width: px2rem(4px);
border-radius: px2rem(2px);
box-shadow: var(--md-shadow-z1);
// [print]: Omit shadow as it may lead to rendering errors
@media print {
box-shadow: none;
}
// Hack: Chrome exhibits a weird issue where it will set nested elements to
// content-box. Doesn't happen in other browsers, so looks like a bug.
> * {
box-sizing: border-box;
}
// Adjust vertical spacing for nested admonitions
:is(.admonition, details) {
margin-top: 1em;
margin-bottom: 1em;
}
// Adjust spacing for contained table wrappers
.md-typeset__scrollwrap {
margin: 1em px2rem(-12px);
}
// Adjust spacing for contained tables
.md-typeset__table {
padding: 0 px2rem(12px);
}
// Adjust spacing for single-child tabbed block container
> .tabbed-set:only-child {
margin-top: 0;
}
// Adjust spacing on last child
html & > :last-child {
margin-bottom: px2rem(12px);
}
}
// Admonition title
:is(.admonition-title, summary) {
position: relative;
margin-block: 0;
margin-inline: px2rem(-16px) px2rem(-12px);
padding-block: px2rem(8px);
padding-inline: px2rem(40px) px2rem(12px);
font-weight: 700;
background-color: color.adjust($clr-blue-a200, $alpha: -0.9);
border: 0 solid $clr-blue-a200;
border-inline-start-width: px2rem(4px);
border-start-start-radius: px2rem(2px);
// Adjust spacing for title-only admonitions
html &:last-child {
margin-bottom: 0;
}
// Admonition icon
&::before {
position: absolute;
top: px2em(10px);
inset-inline-start: px2rem(12px);
width: px2rem(20px);
height: px2rem(20px);
background-color: $clr-blue-a200;
mask-image: var(--md-admonition-icon--note);
mask-repeat: no-repeat;
mask-size: contain;
content: "";
}
}
}
// ----------------------------------------------------------------------------
// Rules: flavours
// ----------------------------------------------------------------------------
@each $names, $props in $admonitions {
$name: list.nth($names, 1);
$tint: list.nth($props, 2);
// Admonition flavour selectors
$flavours: ();
@each $name in $names {
$flavours: list.join($flavours, ".#{$name}", $separator: comma);
}
// Admonition flavour
.md-typeset :is(.admonition, details):is(#{$flavours}) {
border-color: $tint;
}
// Admonition flavour title
.md-typeset :is(#{$flavours}) > :is(.admonition-title, summary) {
background-color: color.adjust($tint, $alpha: -0.9);
border-color: $tint;
// Admonition icon
&::before {
background-color: $tint;
mask-image: var(--md-admonition-icon--#{$name});
mask-repeat: no-repeat;
mask-size: contain;
}
}
}
================================================
FILE: mkposters/third_party/stylesheets/main/extensions/markdown/_footnotes.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Rules
// ----------------------------------------------------------------------------
// Footnotes variables
:root {
--md-footnotes-icon: svg-load("material/keyboard-return.svg");
}
// ----------------------------------------------------------------------------
// Scoped in typesetted content to match specificity of regular content
.md-typeset {
// Footnote container
.footnote {
color: var(--md-default-fg-color--light);
font-size: px2rem(12.8px);
// Footnote list - omit left indentation
> ol {
margin-inline-start: 0;
// Footnote item - footnote items can contain lists, so we need to scope
// the spacing adjustments to the top-level footnote item.
> li {
transition: color 125ms;
// Darken color on target
&:target {
color: var(--md-default-fg-color);
}
// Show backreferences on footnote focus without transition
&:focus-within .footnote-backref {
transform: translateX(0);
opacity: 1;
transition: none;
}
// Show backreferences on footnote hover/target
&:is(:hover, :target) .footnote-backref {
transform: translateX(0);
opacity: 1;
}
// Adjust spacing on first child
> :first-child {
margin-top: 0;
}
}
}
}
// Footnote reference
.footnote-ref {
font-weight: 700;
font-size: px2em(12px, 16px);
// Hack: increase specificity to override default
html & {
outline-offset: px2rem(2px);
}
}
// Show outline for all devices
[id^="fnref:"]:target > .footnote-ref {
outline: auto;
}
// Footnote backreference
.footnote-backref {
display: inline-block;
color: var(--md-typeset-a-color);
// Hack: omit Unicode arrow for replacement with icon
font-size: 0;
vertical-align: text-bottom;
transform: translateX(px2rem(5px));
opacity: 0;
transition:
color 250ms,
transform 250ms 250ms,
opacity 125ms 250ms;
// [print]: Show footnote backreferences
@media print {
color: var(--md-typeset-a-color);
transform: translateX(0);
opacity: 1;
}
// Adjust for right-to-left languages
[dir="rtl"] & {
transform: translateX(px2rem(-5px));
}
// Adjust color on hover
&:hover {
color: var(--md-accent-fg-color);
}
// Footnote backreference icon
&::before {
display: inline-block;
width: px2rem(16px);
height: px2rem(16px);
background-color: currentcolor;
mask-image: var(--md-footnotes-icon);
mask-repeat: no-repeat;
mask-size: contain;
content: "";
// Adjust for right-to-left languages
[dir="rtl"] & {
// Flip icon vertically
svg {
transform: scaleX(-1);
}
}
}
}
}
================================================
FILE: mkposters/third_party/stylesheets/main/extensions/markdown/_toc.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Rules
// ----------------------------------------------------------------------------
// Scoped in typesetted content to match specificity of regular content
.md-typeset {
// Headerlink
.headerlink {
display: inline-block;
margin-inline-start: px2rem(10px);
color: var(--md-default-fg-color--lighter);
opacity: 0;
transition:
color 250ms,
opacity 125ms;
// [print]: Hide headerlinks
@media print {
display: none;
}
}
// Show headerlinks on parent hover
:is(:hover, :target) > .headerlink,
.headerlink:focus {
opacity: 1;
transition:
color 250ms,
opacity 125ms;
}
// Adjust color on parent target or focus/hover
:target > .headerlink,
.headerlink:is(:focus, :hover) {
color: var(--md-accent-fg-color);
}
// Adjust scroll margin for all elements with `id` attributes
:target {
--md-scroll-margin: #{px2rem(48px + 24px)};
--md-scroll-offset: #{px2rem(0px)};
// Scroll margin is finally ready for prime time - before, we used a hack
// for anchor correction based on pseudo elements but those times are gone.
scroll-margin-top:
calc(
var(--md-scroll-margin) -
var(--md-scroll-offset)
);
// [screen +]: Sticky navigation tabs
@include break-from-device(screen) {
// Adjust scroll margin for sticky navigation tabs
.md-header--lifted ~ .md-container & {
--md-scroll-margin: #{px2rem(96px + 24px)};
}
}
}
// Adjust scroll offset for headlines of level 1-3
:is(h1, h2, h3):target {
--md-scroll-offset: #{px2rem(4px)};
}
// Adjust scroll offset for headlines of level 4
h4:target {
--md-scroll-offset: #{px2rem(3px)};
}
}
================================================
FILE: mkposters/third_party/stylesheets/main/extensions/pymdownx/_arithmatex.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Rules
// ----------------------------------------------------------------------------
// Scoped in typesetted content to match specificity of regular content
.md-typeset {
// Arithmatex container
div.arithmatex {
overflow: auto;
// [mobile -]: Align with body copy
@include break-to-device(mobile) {
margin: 0 px2rem(-16px);
}
// Arithmatex content
> * {
width: min-content;
margin-inline: auto !important; // stylelint-disable-line
padding: 0 px2rem(16px);
touch-action: auto;
// MathJax container - see https://bit.ly/3HR8YJ5
mjx-container {
margin: 0 !important; // stylelint-disable-line
}
}
}
}
================================================
FILE: mkposters/third_party/stylesheets/main/extensions/pymdownx/_critic.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Rules
// ----------------------------------------------------------------------------
// Scoped in typesetted content to match specificity of regular content
.md-typeset {
// Deletion, addition or comment
:is(del, ins, .comment).critic {
box-decoration-break: clone;
}
// Deletion
del.critic {
background-color: var(--md-typeset-del-color);
}
// Addition
ins.critic {
background-color: var(--md-typeset-ins-color);
}
// Comment
.critic.comment {
color: var(--md-code-hl-comment-color);
// Comment opening mark
&::before {
content: "/* ";
}
// Comment closing mark
&::after {
content: " */";
}
}
// Critic block
.critic.block {
display: block;
margin: 1em 0;
padding-inline: px2rem(16px);
overflow: auto;
box-shadow: none;
// Adjust spacing on first child
> :first-child {
margin-top: 0.5em;
}
// Adjust spacing on last child
> :last-child {
margin-bottom: 0.5em;
}
}
}
================================================
FILE: mkposters/third_party/stylesheets/main/extensions/pymdownx/_details.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Rules
// ----------------------------------------------------------------------------
// Details variables
:root {
--md-details-icon: svg-load("material/chevron-right.svg");
}
// ----------------------------------------------------------------------------
// Scoped in typesetted content to match specificity of regular content
.md-typeset {
// Details
details {
display: flow-root;
padding-top: 0;
overflow: visible;
// Details title icon - rotate icon on transition to open state
&[open] > summary::after {
transform: rotate(90deg);
}
// Adjust spacing for details in closed state
&:not([open]) {
padding-bottom: 0;
box-shadow: none;
// Hack: we cannot set `overflow: hidden` on the `details` element (which
// is why we set it to `overflow: visible`, as the outline would not be
// visible when focusing. Therefore, we must set the border radius on the
// summary explicitly.
> summary {
border-radius: px2rem(2px);
}
}
}
// Details title
summary {
display: block;
min-height: px2rem(20px);
padding-inline-end: px2rem(36px);
border-start-start-radius: px2rem(2px);
border-start-end-radius: px2rem(2px);
cursor: pointer;
// Show outline for keyboard devices
&.focus-visible {
outline-color: var(--md-accent-fg-color);
outline-offset: px2rem(4px);
}
// Hide outline for pointer devices
&:not(.focus-visible) {
outline: none;
-webkit-tap-highlight-color: transparent;
}
// Details marker
&::after {
position: absolute;
top: px2em(10px);
inset-inline-end: px2rem(8px);
width: px2rem(20px);
height: px2rem(20px);
background-color: currentcolor;
mask-image: var(--md-details-icon);
mask-repeat: no-repeat;
mask-size: contain;
transform: rotate(0deg);
transition: transform 250ms;
content: "";
// Adjust for right-to-left languages
[dir="rtl"] & {
transform: rotate(180deg);
}
}
// Hide native details marker - modern
&::marker {
display: none;
}
// Hide native details marker - legacy, must be split into a seprate rule,
// so older browsers don't consider the selector list as invalid
&::-webkit-details-marker {
display: none;
}
}
}
================================================
FILE: mkposters/third_party/stylesheets/main/extensions/pymdownx/_emoji.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Rules
// ----------------------------------------------------------------------------
// Scoped in typesetted content to match specificity of regular content
.md-typeset {
// Emoji and icon container
:is(.emojione, .twemoji, .gemoji) {
display: inline-flex;
height: px2em(18px);
vertical-align: text-top;
// Icon - inlined via mkdocs-material-extensions
svg {
width: px2em(18px);
max-height: 100%;
fill: currentcolor;
}
}
}
================================================
FILE: mkposters/third_party/stylesheets/main/extensions/pymdownx/_highlight.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Rules: syntax highlighting
// ----------------------------------------------------------------------------
// Code block
.highlight {
// .o = Operator
// .ow = Operator, word
:is(.o, .ow) {
color: var(--md-code-hl-operator-color);
}
.p { // Punctuation
color: var(--md-code-hl-punctuation-color);
}
// .cpf = Comment, preprocessor file
// .l = Literal
// .s = Literal, string
// .sb = Literal, string backticks
// .sc = Literal, string char
// .s2 = Literal, string double
// .si = Literal, string interpol
// .s1 = Literal, string single
// .ss = Literal, string symbol
:is(.cpf, .l, .s, .sb, .sc, .s2, .si, .s1, .ss) {
color: var(--md-code-hl-string-color);
}
// .cp = Comment, pre-processor
// .se = Literal, string escape
// .sh = Literal, string heredoc
// .sr = Literal, string regex
// .sx = Literal, string other
:is(.cp, .se, .sh, .sr, .sx) {
color: var(--md-code-hl-special-color);
}
// .m = Number
// .mb = Number, binary
// .mf = Number, float
// .mh = Number, hex
// .mi = Number, integer
// .il = Number, integer long
// .mo = Number, octal
:is(.m, .mb, .mf, .mh, .mi, .il, .mo) {
color: var(--md-code-hl-number-color);
}
// .k = Keyword,
// .kd = Keyword, declaration
// .kn = Keyword, namespace
// .kp = Keyword, pseudo
// .kr = Keyword, reserved
// .kt = Keyword, type
:is(.k, .kd, .kn, .kp, .kr, .kt) {
color: var(--md-code-hl-keyword-color);
}
// .kc = Keyword, constant
// .n = Name
:is(.kc, .n) {
color: var(--md-code-hl-name-color);
}
// .no = Name, constant
// .nb = Name, builtin
// .bp = Name, builtin pseudo
:is(.no, .nb, .bp) {
color: var(--md-code-hl-constant-color);
}
// .nc = Name, class
// .ne = Name, exception
// .nf = Name, function
// .nn = Name, namespace
:is(.nc, .ne, .nf, .nn) {
color: var(--md-code-hl-function-color);
}
// .nd = Name, decorator
// .ni = Name, entity
// .nl = Name, label
// .nt = Name, tag
:is(.nd, .ni, .nl, .nt) {
color: var(--md-code-hl-keyword-color);
}
// .c = Comment
// .cm = Comment, multiline
// .c1 = Comment, single
// .ch = Comment, shebang
// .cs = Comment, special
// .sd = Literal, string doc
:is(.c, .cm, .c1, .ch, .cs, .sd) {
color: var(--md-code-hl-comment-color);
}
// .na = Name, attribute
// .nv = Variable,
// .vc = Variable, class
// .vg = Variable, global
// .vi = Variable, instance
:is(.na, .nv, .vc, .vg, .vi) {
color: var(--md-code-hl-variable-color);
}
// .ge = Generic, emph
// .gr = Generic, error
// .gh = Generic, heading
// .go = Generic, output
// .gp = Generic, prompt
// .gs = Generic, strong
// .gu = Generic, subheading
// .gt = Generic, traceback
:is(.ge, .gr, .gh, .go, .gp, .gs, .gu, .gt) {
color: var(--md-code-hl-generic-color);
}
// .gd = Diff, delete
// .gi = Diff, insert
:is(.gd, .gi) {
margin: 0 px2em(-2px);
padding: 0 px2em(2px);
border-radius: px2rem(2px);
}
.gd { // Diff, delete
background-color: var(--md-typeset-del-color);
}
.gi { // Diff, insert
background-color: var(--md-typeset-ins-color);
}
// Highlighted line
.hll {
display: block;
margin: 0 px2em(-16px, 13.6px);
padding: 0 px2em(16px, 13.6px);
background-color: var(--md-code-hl-color);
}
// Code block title
span.filename {
position: relative;
display: block;
margin-top: 1em;
padding: px2em(9px, 13.6px) px2em(16px, 13.6px);
font-weight: 700;
font-size: px2em(13.6px);
background-color: var(--md-code-bg-color);
border-bottom: px2rem(1px) solid var(--md-default-fg-color--lightest);
border-top-left-radius: px2rem(2px);
border-top-right-radius: px2rem(2px);
// Adjust spacing for code block
+ pre {
margin-top: 0;
// Remove rounded border on top side
> code {
border-top-left-radius: 0;
border-top-right-radius: 0;
}
}
}
// Code block line numbers (pymdownx-inline)
[data-linenos]::before {
position: sticky;
left: px2em(-16px, 13.6px);
// A `z-index` of 3 is necessary for ensuring that code block annotations
// don't overlay line numbers, as active annotations have a `z-index` of 2.
z-index: 3;
float: left;
margin-right: px2em(16px, 13.6px);
margin-left: px2em(-16px, 13.6px);
padding-left: px2em(16px, 13.6px);
color: var(--md-default-fg-color--light);
background-color: var(--md-code-bg-color);
box-shadow: px2rem(-1px) 0 var(--md-default-fg-color--lightest) inset;
content: attr(data-linenos);
user-select: none;
}
// Code block line anchors - Chrome and Safari seem to have a strange bug
// where scroll margin is not applied to anchors inside code blocks. Setting
// positioning to absolute seems to fix the problem. Interestingly, this does
// not happen in Firefox. Furthermore we must set `visibility: hidden` or
// the copy to clipboard functionality will include an empty line between
// each set of lines.
code a[id] {
position: absolute;
visibility: hidden;
}
// Copying in progress - this class is set before the content is copied and
// removed after copying is done to mitigate whitespace-related issues.
code[data-md-copying] {
// Temporarily remove highlighted lines - see https://bit.ly/32iVGWh
.hll {
display: contents;
}
// Temporarily remove annotations
.md-annotation {
display: none;
}
}
}
// ----------------------------------------------------------------------------
// Rules: layout
// ----------------------------------------------------------------------------
// Code block with line numbers
.highlighttable {
display: flow-root;
// Set table elements to block layout, because otherwise the whole flexbox
// hacking won't work correctly
:is(tbody, td) {
display: block;
padding: 0;
}
// We need to use flexbox layout, because otherwise it's not possible to
// make the code container scroll while keeping the line numbers static
tr {
display: flex;
}
// The pre tags are nested inside a table, so we need to omit the margin
// because it collapses below all the overflows
pre {
margin: 0;
}
// Code block title container
th.filename {
flex-grow: 1;
padding: 0;
text-align: left;
}
// Code block line numbers - disable user selection, so code can be easily
// copied without accidentally also copying the line numbers
.linenos {
padding: px2em(10.5px, 13.6px) px2em(16px, 13.6px);
padding-right: 0;
font-size: px2em(13.6px);
background-color: var(--md-code-bg-color);
border-top-left-radius: px2rem(2px);
border-bottom-left-radius: px2rem(2px);
user-select: none;
}
// Code block line numbers container
.linenodiv {
padding-right: px2em(8px, 13.6px);
box-shadow: px2rem(-1px) 0 var(--md-default-fg-color--lightest) inset;
// Adjust colors and alignment
pre {
color: var(--md-default-fg-color--light);
text-align: right;
}
}
// Code block container - stretch to remaining space
.code {
flex: 1;
min-width: 0;
}
}
// Code block line numbers container
.linenodiv a {
color: inherit;
}
// ----------------------------------------------------------------------------
// Scoped in typesetted content to match specificity of regular content
.md-typeset {
// Code block with line numbers
.highlighttable {
margin: 1em 0;
direction: ltr;
// Remove rounded borders on left side
code {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
}
// Code block result container
:is(.highlight, .highlighttable) + .result {
margin-top: calc(-1em + #{px2em(-2px)});
padding: 0 px2em(16px);
overflow: visible;
border: px2rem(1px) solid var(--md-code-bg-color);
border-top-width: px2rem(2px);
border-bottom-right-radius: px2rem(2px);
border-bottom-left-radius: px2rem(2px);
// Clearfix, because we can't use overflow: auto
&::after {
display: block;
clear: both;
content: "";
}
}
}
// ----------------------------------------------------------------------------
// Rules: top-level
// ----------------------------------------------------------------------------
// [mobile -]: Align with body copy
@include break-to-device(mobile) {
// Top-level code block
.md-content__inner > .highlight {
margin: 1em px2rem(-16px);
// Highlighted line
.hll {
margin: 0 px2rem(-16px);
padding: 0 px2rem(16px);
}
// Remove rounded borders
code {
border-radius: 0;
}
// Code block result container
+ .result {
margin-inline: px2rem(-16px);
border-inline-width: 0;
border-radius: 0;
}
}
// Top-level code block with line numbers
.md-content__inner > .highlighttable {
margin: 1em px2rem(-16px);
border-radius: 0;
// Highlighted line
.hll {
margin: 0 px2rem(-16px);
padding: 0 px2rem(16px);
}
}
}
================================================
FILE: mkposters/third_party/stylesheets/main/extensions/pymdownx/_keys.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Rules
// ----------------------------------------------------------------------------
// Scoped in typesetted content to match specificity of regular content
.md-typeset {
// Keyboard key
.keys {
// Keyboard key icon
kbd:is(::before, ::after) {
position: relative;
margin: 0;
color: inherit;
-moz-osx-font-smoothing: initial;
-webkit-font-smoothing: initial;
}
// Surrounding text
span {
padding: 0 px2em(3.2px);
color: var(--md-default-fg-color--light);
}
// Define keyboard keys with left icon
@each $name, $code in (
// Modifiers
"alt": "\2387",
"left-alt": "\2387",
"right-alt": "\2387",
"command": "\2318",
"left-command": "\2318",
"right-command": "\2318",
"control": "\2303",
"left-control": "\2303",
"right-control": "\2303",
"meta": "\25C6",
"left-meta": "\25C6",
"right-meta": "\25C6",
"option": "\2325",
"left-option": "\2325",
"right-option": "\2325",
"shift": "\21E7",
"left-shift": "\21E7",
"right-shift": "\21E7",
"super": "\2756",
"left-super": "\2756",
"right-super": "\2756",
"windows": "\229E",
"left-windows": "\229E",
"right-windows": "\229E",
// Other keys
"arrow-down": "\2193",
"arrow-left": "\2190",
"arrow-right": "\2192",
"arrow-up": "\2191",
"backspace": "\232B",
"backtab": "\21E4",
"caps-lock": "\21EA",
"clear": "\2327",
"context-menu": "\2630",
"delete": "\2326",
"eject": "\23CF",
"end": "\2913",
"escape": "\238B",
"home": "\2912",
"insert": "\2380",
"page-down": "\21DF",
"page-up": "\21DE",
"print-screen": "\2399"
) {
.key-#{$name}::before {
padding-right: px2em(6.4px);
content: $code;
}
}
// Define keyboard keys with right icon
@each $name, $code in (
"tab": "\21E5",
"num-enter": "\2324",
"enter": "\23CE"
) {
.key-#{$name}::after {
padding-left: px2em(6.4px);
content: $code;
}
}
}
}
================================================
FILE: mkposters/third_party/stylesheets/main/extensions/pymdownx/_tabbed.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Rules
// ----------------------------------------------------------------------------
// Scoped in typesetted content to match specificity of regular content
.md-typeset {
// Tabbed container
.tabbed-set {
position: relative;
display: flex;
flex-flow: column wrap;
margin: 1em 0;
border-radius: px2rem(2px);
// Tab radio button - the Tabbed extension will generate radio buttons with
// labels, so tabs can be triggered without the necessity for JavaScript.
// This is pretty cool, as it has great accessibility out-of-the box, so
// we just hide the radio button and toggle the label color for indication.
> input {
position: absolute;
width: 0;
height: 0;
opacity: 0;
// Adjust scroll margin
&:target {
--md-scroll-offset: #{px2em(10px, 16px)};
}
// Tab label states
@for $i from 20 through 1 {
&:nth-child(#{$i}) {
// Tab is active
&:checked {
// Tab label
~ .tabbed-labels > :nth-child(#{$i}) {
@extend %tabbed-label;
}
// Tab content
~ .tabbed-content > :nth-child(#{$i}) {
@extend %tabbed-content;
}
}
// Tab label on keyboard focus
&.focus-visible ~ .tabbed-labels > :nth-child(#{$i}) {
@extend %tabbed-label-focus-visible;
}
}
}
}
}
// Tabbed labels
.tabbed-labels {
display: flex;
max-width: 100%;
overflow: auto;
box-shadow: 0 px2rem(-1px) var(--md-default-fg-color--lightest) inset;
scroll-snap-type: x proximity;
-ms-overflow-style: none; // IE, Edge
scrollbar-width: none; // Firefox
// [print]: Move one layer up for ordering
@media print {
display: contents;
}
// [screen and no reduced motion]: Disable animation
@media screen {
// [js]: Show animated tab indicator
.js & {
position: relative;
// Tab indicator
&::before {
position: absolute;
bottom: 0;
left: 0;
display: block;
width: var(--md-indicator-width);
height: 2px;
background: var(--md-accent-fg-color);
transform: translateX(var(--md-indicator-x));
transition:
width 225ms,
transform 250ms;
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
content: "";
}
}
}
// Webkit scrollbar
&::-webkit-scrollbar {
display: none; // Chrome, Safari
}
// Tab label
> label {
flex-shrink: 0;
width: auto;
padding: px2em(10px, 12.8px) 1.25em px2em(8px, 12.8px);
color: var(--md-default-fg-color--light);
font-weight: 700;
font-size: px2rem(12.8px);
white-space: nowrap;
border-bottom: px2rem(2px) solid transparent;
scroll-snap-align: start;
border-radius: px2rem(2px) px2rem(2px) 0 0;
cursor: pointer;
transition:
background-color 250ms,
color 250ms;
// [print]: Intersperse labels with containers
@media print {
// Ensure correct order of labels
@for $i from 1 through 20 {
&:nth-child(#{$i}) {
order: $i;
}
}
}
// Tab label on hover
&:hover {
color: var(--md-accent-fg-color);
}
}
}
// Tabbed content
.tabbed-content {
width: 100%;
// [print]: Move one layer up for ordering
@media print {
display: contents;
}
}
// Tabbed block
.tabbed-block {
display: none;
// [print]: Intersperse labels with containers
@media print {
display: block;
// Ensure correct order of containers
@for $i from 1 through 20 {
&:nth-child(#{$i}) {
order: $i;
}
}
}
// Code block is the first child of a tab - remove margin and mirror
// previous (now deprecated) SuperFences code block grouping behavior
> pre:first-child,
> .highlight:first-child pre,
> .highlighttable:first-child {
margin: 0;
// Remove rounded borders
code {
border-start-start-radius: 0;
border-start-end-radius: 0;
}
}
// Remove rounded border on line numbers container
> .highlighttable:first-child .linenos {
border-start-start-radius: 0;
border-start-end-radius: 0;
}
// Code block result container is the second child
> .result:nth-child(2) {
margin-top: 0;
}
// Adjust spacing for nested tabbed container
> .tabbed-set {
margin: 0;
}
}
}
// ----------------------------------------------------------------------------
// Rules: top-level
// ----------------------------------------------------------------------------
// [mobile -]: Align with body copy
@include break-to-device(mobile) {
// Top-level tabbed labels
.md-content__inner > .tabbed-set .tabbed-labels {
max-width: 100vw;
margin: 0 px2rem(-16px);
padding-inline-start: px2rem(16px);
scroll-padding-inline-start: px2rem(16px);
// Hack: some browsers ignore the right padding on flex containers,
// see https://bit.ly/3lsPS3S
&::after {
padding-inline-end: px2rem(16px);
content: "";
}
}
}
// ----------------------------------------------------------------------------
// Placeholders: improve colocation for better compression
// ----------------------------------------------------------------------------
// Tab label placeholder
%tabbed-label {
// [screen]: Show active state
@media screen {
color: var(--md-accent-fg-color);
// [no-js]: Show border (indicator is animated with JavaScript)
.no-js & {
border-color: var(--md-accent-fg-color);
}
}
}
// Tab label on keyboard focus placeholder
%tabbed-label-focus-visible {
background-color: var(--md-accent-fg-color--transparent);
}
// Tab content placeholder
%tabbed-content {
display: block;
}
================================================
FILE: mkposters/third_party/stylesheets/main/extensions/pymdownx/_tasklist.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Rules
// ----------------------------------------------------------------------------
// Tasklist variables
:root {
--md-tasklist-icon:
svg-load("octicons/check-circle-fill-24.svg");
--md-tasklist-icon--checked:
svg-load("octicons/check-circle-fill-24.svg");
}
// ----------------------------------------------------------------------------
// Scoped in typesetted content to match specificity of regular content
.md-typeset {
// Tasklist item
.task-list-item {
position: relative;
list-style-type: none;
// Make checkbox items align with normal list items, but position
// everything in ems for correct layout at smaller font sizes
[type="checkbox"] {
position: absolute;
top: 0.45em;
inset-inline-start: -2em;
}
}
// Hide native checkbox, when custom classes are enabled
.task-list-control [type="checkbox"] {
z-index: -1;
opacity: 0;
}
// Tasklist indicator in unchecked state
.task-list-indicator::before {
position: absolute;
top: 0.15em;
inset-inline-start: px2em(-24px);
width: px2em(20px);
height: px2em(20px);
background-color: var(--md-default-fg-color--lightest);
mask-image: var(--md-tasklist-icon);
mask-repeat: no-repeat;
mask-size: contain;
content: "";
}
// Tasklist indicator in checked state
[type="checkbox"]:checked + .task-list-indicator::before {
background-color: $clr-green-a400;
mask-image: var(--md-tasklist-icon--checked);
}
}
================================================
FILE: mkposters/third_party/stylesheets/main/integrations/_mermaid.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Rules
// ----------------------------------------------------------------------------
// All definitions
:root > * {
--md-mermaid-font-family: var(--md-text-font-family), sans-serif;
// Colors
--md-mermaid-edge-color: var(--md-code-fg-color);
--md-mermaid-node-bg-color: var(--md-accent-fg-color--transparent);
--md-mermaid-node-fg-color: var(--md-accent-fg-color);
--md-mermaid-label-bg-color: var(--md-default-bg-color);
--md-mermaid-label-fg-color: var(--md-code-fg-color);
}
// Mermaid container
.mermaid {
margin: 1em 0;
line-height: normal;
}
================================================
FILE: mkposters/third_party/stylesheets/main/layout/_banner.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Rules
// ----------------------------------------------------------------------------
// Banner for announcements and warnings
.md-banner {
overflow: auto;
color: var(--md-footer-fg-color);
background-color: var(--md-footer-bg-color);
// [print]: Hide banner
@media print {
display: none;
}
// Banner with warning
&--warning {
color: var(--md-default-fg-color);
background: var(--md-typeset-mark-color);
}
// Banner wrapper
&__inner {
margin: px2rem(12px) auto;
padding: 0 px2rem(16px);
font-size: px2rem(14px);
}
}
================================================
FILE: mkposters/third_party/stylesheets/main/layout/_base.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Rules: base grid and containers
// ----------------------------------------------------------------------------
// Stretch container to viewport and set base `font-size`
html {
height: 100%;
overflow-x: hidden;
// Hack: normally, we would set the base `font-size` to `62.5%`, so we can
// base all calculations on `10px`, but Chromium and Chrome define a minimal
// `font-size` of `12px` if the system language is set to Chinese. For this
// reason we just double the `font-size` and set it to `20px`.
//
// See https://github.com/squidfunk/mkdocs-material/issues/911
font-size: 125%;
// [screen medium +]: Set base `font-size` to `11px`
@include break-from-device(screen medium) {
font-size: 137.5%;
}
// [screen large +]: Set base `font-size` to `12px`
@include break-from-device(screen large) {
font-size: 150%;
}
}
// Stretch body to container - flexbox is used, so the footer will always be
// aligned to the bottom of the viewport
body {
position: relative;
display: flex;
flex-direction: column;
width: 100%;
min-height: 100%;
// Hack: reset `font-size` to `10px`, so the spacing for all inline elements
// is correct again. Otherwise the spacing would be based on `20px`.
font-size: px2rem(10px);
background-color: var(--md-default-bg-color);
// [print]: Omit flexbox layout due to a Firefox bug (https://mzl.la/39DgR3m)
@media print {
display: block;
}
// Body in locked state
&[data-md-state="lock"] {
// [tablet portrait -]: Omit scroll bubbling
@include break-to-device(tablet portrait) {
position: fixed;
}
}
}
// ----------------------------------------------------------------------------
// Grid container - this class is applied to wrapper elements within the
// header, content area and footer, and makes sure that their width is limited
// to `1220px`, and they are rendered centered if the screen is larger.
.md-grid {
max-width: px2rem(1220px);
margin-inline: auto;
}
// Main container
.md-container {
display: flex;
flex-direction: column;
flex-grow: 1;
// [print]: Omit flexbox layout due to a Firefox bug (https://mzl.la/39DgR3m)
@media print {
display: block;
}
}
// Main area - stretch to remaining space of container
.md-main {
flex-grow: 1;
// Main area wrapper
&__inner {
display: flex;
height: 100%;
margin-top: px2rem(24px + 6px);
}
}
// Add ellipsis in case of overflowing text
.md-ellipsis {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
// ----------------------------------------------------------------------------
// Rules: navigational elements
// ----------------------------------------------------------------------------
// Toggle - this class is applied to checkbox elements, which are used to
// implement the CSS-only drawer and navigation, as well as the search
.md-toggle {
display: none;
}
// Option - this class is applied to radio elements, which are used to
// implement the color palette toggle
.md-option {
position: absolute;
width: 0;
height: 0;
opacity: 0;
// Option label for checked radio button
&:checked + label:not([hidden]) {
display: block;
}
// Show outline for keyboard devices
&.focus-visible + label {
outline-style: auto;
outline-color: var(--md-accent-fg-color);
}
}
// Skip link
.md-skip {
position: fixed;
// Hack: if we don't set the negative `z-index`, the skip link will force the
// creation of new layers when code blocks are near the header on scrolling
z-index: -1;
margin: px2rem(10px);
padding: px2rem(6px) px2rem(10px);
color: var(--md-default-bg-color);
font-size: px2rem(12.8px);
background-color: var(--md-default-fg-color);
border-radius: px2rem(2px);
outline-color: var(--md-accent-fg-color);
transform: translateY(px2rem(8px));
opacity: 0;
// Show skip link on focus
&:focus {
z-index: 10;
transform: translateY(0);
opacity: 1;
transition:
transform 250ms cubic-bezier(0.4, 0, 0.2, 1),
opacity 175ms 75ms;
}
}
// ----------------------------------------------------------------------------
// Rules: print styles
// ----------------------------------------------------------------------------
// Add margins to page
@page {
margin: 25mm;
}
================================================
FILE: mkposters/third_party/stylesheets/main/layout/_clipboard.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Rules
// ----------------------------------------------------------------------------
// Clipboard button variables
:root {
--md-clipboard-icon: svg-load("material/content-copy.svg");
}
// ----------------------------------------------------------------------------
// Clipboard button
.md-clipboard {
position: absolute;
top: px2em(8px);
right: px2em(8px);
z-index: 1;
width: px2em(24px);
height: px2em(24px);
color: var(--md-default-fg-color--lightest);
border-radius: px2rem(2px);
outline-color: var(--md-accent-fg-color);
outline-offset: px2rem(2px);
cursor: pointer;
transition: color 250ms;
// [print]: Hide button
@media print {
display: none;
}
// Hide outline for pointer devices
&:not(.focus-visible) {
outline: none;
-webkit-tap-highlight-color: transparent;
}
// Darken color on code block hover
:hover > & {
color: var(--md-default-fg-color--light);
}
// Button on focus/hover
&:is(:focus, :hover) {
color: var(--md-accent-fg-color);
}
// Button icon - the width and height are defined in `em`, so the size is
// automatically adjusted for nested code blocks (e.g. in admonitions)
&::after {
display: block;
width: px2em(18px);
height: px2em(18px);
margin: 0 auto;
background-color: currentcolor;
mask-image: var(--md-clipboard-icon);
mask-repeat: no-repeat;
mask-size: contain;
content: "";
}
// Inline clipboard button
&--inline {
cursor: pointer;
// Code block
code {
transition:
color 250ms,
background-color 250ms;
}
// Code block on focus/hover
&:is(:focus, :hover) code {
color: var(--md-accent-fg-color);
background-color: var(--md-accent-fg-color--transparent);
}
}
}
================================================
FILE: mkposters/third_party/stylesheets/main/layout/_content.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Rules
// ----------------------------------------------------------------------------
// Content area
.md-content {
flex-grow: 1;
// Hack: we must use `min-width: 0`, so the content area is capped by the
// dimensions of its parent. Otherwise, long code blocks might lead to a
// wider content area which will overflow. See https://bit.ly/3bP3f8k
min-width: 0;
// Content wrapper
&__inner {
margin: 0 px2rem(16px) px2rem(24px);
padding-top: px2rem(12px);
// [screen +]: Adjust spacing between content area and sidebars
@include break-from-device(screen) {
// Sidebar with navigation is visible
.md-sidebar--primary:not([hidden]) ~ .md-content > & {
margin-inline-start: px2rem(24px);
}
// Sidebar with table of contents is visible
.md-sidebar--secondary:not([hidden]) ~ .md-content > & {
margin-inline-end: px2rem(24px);
}
}
// Hack: add pseudo element for spacing, as the overflow of the content
// container may not be hidden due to an imminent offset error on targets
&::before {
display: block;
height: px2rem(8px);
content: "";
}
// Adjust spacing on last child
> :last-child {
margin-bottom: 0;
}
}
// Button inside of the content area - these buttons are meant for actions on
// a document-level, i.e. linking to related source code files, printing etc.
&__button {
float: right;
margin: px2rem(8px) 0;
margin-inline-start: px2rem(8px);
padding: 0;
// [print]: Hide buttons
@media print {
display: none;
}
// Adjust for right-to-left languages
[dir="rtl"] & {
float: left;
}
// Adjust default link color for icons
.md-typeset & {
color: var(--md-default-fg-color--lighter);
}
// Align with body copy located next to icon
svg {
display: inline;
vertical-align: top;
// Adjust for right-to-left languages
[dir="rtl"] & {
transform: scaleX(-1);
}
}
}
}
================================================
FILE: mkposters/third_party/stylesheets/main/layout/_dialog.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Rules
// ----------------------------------------------------------------------------
// Dialog
.md-dialog {
position: fixed;
inset-inline-end: px2rem(16px);
bottom: px2rem(16px);
z-index: 4;
min-width: px2rem(222px);
padding: px2rem(8px) px2rem(12px);
background-color: var(--md-default-fg-color);
border-radius: px2rem(2px);
box-shadow: var(--md-shadow-z3);
transform: translateY(100%);
opacity: 0;
transition:
transform 0ms 400ms,
opacity 400ms;
pointer-events: none;
// [print]: Hide dialog
@media print {
display: none;
}
// Dialog in open state
&[data-md-state="open"] {
transform: translateY(0);
opacity: 1;
transition:
transform 400ms cubic-bezier(0.075, 0.85, 0.175, 1),
opacity 400ms;
pointer-events: initial;
}
// Dialog wrapper
&__inner {
color: var(--md-default-bg-color);
font-size: px2rem(14px);
}
}
================================================
FILE: mkposters/third_party/stylesheets/main/layout/_footer.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Rules
// ----------------------------------------------------------------------------
// Footer
.md-footer {
color: var(--md-footer-fg-color);
background-color: var(--md-footer-bg-color);
// [print]: Hide footer
@media print {
display: none;
}
// Footer wrapper
&__inner {
display: flex;
justify-content: space-between;
padding: px2rem(4px);
overflow: auto;
}
// Footer link to previous and next page
&__link {
display: flex;
// Hack: some browsers induce ellipsis on flex children that are set to
// `overflow: hidden` and `text-overflow: ellipsis`. Enforcing growth by
// a tiny factor seems to get rid of the ellipsis and renders the text as
// it should - see https://bit.ly/2ZUCXQ8
flex-grow: 0.01;
padding-top: px2rem(28px);
padding-bottom: px2rem(8px);
overflow: hidden;
outline-color: var(--md-accent-fg-color);
transition: opacity 250ms;
// Footer link on focus/hover
&:is(:focus, :hover) {
opacity: 0.7;
}
// Adjust for right-to-left languages
[dir="rtl"] & svg {
transform: scaleX(-1);
}
// Footer link to previous page
&--prev {
// [mobile -]: Adjust width to 25/75 and hide title
@include break-to-device(mobile) {
// Hide footer title
.md-footer__title {
display: none;
}
}
}
// Footer link to next page
&--next {
margin-inline-start: auto;
text-align: right;
// Adjust for right-to-left languages
[dir="rtl"] & {
text-align: left;
}
}
}
// Footer title
&__title {
position: relative;
flex-grow: 1;
max-width: calc(100% - #{px2rem(48px)});
padding: 0 px2rem(20px);
font-size: px2rem(18px);
line-height: px2rem(48px);
}
// Footer link button
&__button {
margin: px2rem(4px);
padding: px2rem(8px);
}
// Footer link direction (i.e. prev and next)
&__direction {
position: absolute;
inset-inline: 0;
margin-top: px2rem(-20px);
padding: 0 px2rem(20px);
font-size: px2rem(12.8px);
opacity: 0.7;
}
}
// Footer metadata
.md-footer-meta {
background-color: var(--md-footer-bg-color--dark);
// Footer metadata wrapper
&__inner {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
padding: px2rem(4px);
}
// Lighten color for non-hovered text links
html &.md-typeset a {
color: var(--md-footer-fg-color--light);
// Text link on focus/hover
&:is(:focus, :hover) {
color: var(--md-footer-fg-color);
}
}
}
// ----------------------------------------------------------------------------
// Copyright and theme information
.md-copyright {
width: 100%;
margin: auto px2rem(12px);
padding: px2rem(8px) 0;
color: var(--md-footer-fg-color--lighter);
font-size: px2rem(12.8px);
// [tablet portrait +]: Show copyright and social links in one line
@include break-from-device(tablet portrait) {
width: auto;
}
// Footer copyright highlight - this is the upper part of the copyright and
// theme information, which will include a darker color than the theme link
&__highlight {
color: var(--md-footer-fg-color--light);
}
}
// ----------------------------------------------------------------------------
// Social links
.md-social {
margin: 0 px2rem(8px);
padding: px2rem(4px) 0 px2rem(12px);
// [tablet portrait +]: Show copyright and social links in one line
@include break-from-device(tablet portrait) {
padding: px2rem(12px) 0;
}
// Footer social link
&__link {
display: inline-block;
width: px2rem(32px);
height: px2rem(32px);
text-align: center;
// Adjust line-height to match height for correct alignment
&::before {
line-height: 1.9;
}
// Fill icon with current color
svg {
max-height: px2rem(16px);
vertical-align: -25%;
fill: currentcolor;
}
}
}
================================================
FILE: mkposters/third_party/stylesheets/main/layout/_form.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Rules
// ----------------------------------------------------------------------------
// Scoped in typesetted content to match specificity of regular content
.md-typeset {
// Form button
.md-button {
display: inline-block;
padding: px2em(10px) px2em(32px);
color: var(--md-primary-fg-color);
font-weight: 700;
border: px2rem(2px) solid currentcolor;
border-radius: px2rem(2px);
cursor: pointer;
transition:
color 125ms,
background-color 125ms,
border-color 125ms;
// Primary button
&--primary {
color: var(--md-primary-bg-color);
background-color: var(--md-primary-fg-color);
border-color: var(--md-primary-fg-color);
}
// Button on focus/hover
&:is(:focus, :hover) {
color: var(--md-accent-bg-color);
background-color: var(--md-accent-fg-color);
border-color: var(--md-accent-fg-color);
}
}
// Form input
.md-input {
height: px2rem(36px);
padding: 0 px2rem(12px);
font-size: px2rem(16px);
border-bottom: px2rem(2px) solid var(--md-default-fg-color--lighter);
border-start-start-radius: px2rem(2px);
border-start-end-radius: px2rem(2px);
box-shadow: var(--md-shadow-z1);
transition:
border 250ms,
box-shadow 250ms;
// Input on focus/hover
&:is(:focus, :hover) {
border-bottom-color: var(--md-accent-fg-color);
box-shadow: var(--md-shadow-z2);
}
// Stretch to full width
&--stretch {
width: 100%;
}
}
}
================================================
FILE: mkposters/third_party/stylesheets/main/layout/_header.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Rules
// ----------------------------------------------------------------------------
// Header - by default, the header will be sticky and stay always on top of the
// viewport. If this behavior is not desired, just set `position: static`.
.md-header {
position: sticky;
top: 0;
inset-inline: 0;
z-index: 4;
color: var(--md-primary-bg-color);
background-color: var(--md-primary-fg-color);
// Hack: reduce jitter by adding a transparent box shadow of the same size
// so the size of the layer doesn't change during animation
box-shadow:
0 0 px2rem(4px) rgba(0, 0, 0, 0),
0 px2rem(4px) px2rem(8px) rgba(0, 0, 0, 0);
// [print]: Hide header
@media print {
display: none;
}
// Header in shadow state, i.e. shadow is visible
&[data-md-state="shadow"] {
box-shadow:
0 0 px2rem(4px) rgba(0, 0, 0, 0.1),
0 px2rem(4px) px2rem(8px) rgba(0, 0, 0, 0.2);
transition:
transform 250ms cubic-bezier(0.1, 0.7, 0.1, 1),
box-shadow 250ms;
}
// Header in hidden state, i.e. moved out of sight
&[data-md-state="hidden"] {
transform: translateY(-100%);
transition:
transform 250ms cubic-bezier(0.8, 0, 0.6, 1),
box-shadow 250ms;
}
// Header wrapper
&__inner {
display: flex;
align-items: center;
padding: 0 px2rem(4px);
}
// Header button
&__button {
position: relative;
z-index: 1;
margin: px2rem(4px);
padding: px2rem(8px);
color: currentcolor;
vertical-align: middle;
outline-color: var(--md-accent-fg-color);
cursor: pointer;
transition: opacity 250ms;
// Button on hover
&:hover {
opacity: 0.7;
}
// Header button is visible
&:not([hidden]) {
display: inline-block;
}
// Hide outline for pointer devices
&:not(.focus-visible) {
outline: none;
-webkit-tap-highlight-color: transparent;
}
// Button with logo, pointing to `config.site_url`
&.md-logo {
margin: px2rem(4px);
padding: px2rem(8px);
// [tablet -]: Hide button
@include break-to-device(tablet) {
display: none;
}
// Image or icon
:is(img, svg) {
display: block;
width: auto;
height: px2rem(24px);
fill: currentcolor;
}
}
// Button for search
&[for="__search"] {
// [tablet landscape +]: Hide button
@include break-from-device(tablet landscape) {
display: none;
}
// [no-js]: Hide button
.no-js & {
display: none;
}
// Adjust for right-to-left languages
[dir="rtl"] & svg {
transform: scaleX(-1);
}
}
// Button for drawer
&[for="__drawer"] {
// [screen +]: Hide button
@include break-from-device(screen) {
display: none;
}
}
}
// Header topic
&__topic {
position: absolute;
display: flex;
max-width: 100%;
transition:
transform 400ms cubic-bezier(0.1, 0.7, 0.1, 1),
opacity 150ms;
// Second header topic - title of the current page
& + & {
z-index: -1;
transform: translateX(px2rem(25px));
opacity: 0;
transition:
transform 400ms cubic-bezier(1, 0.7, 0.1, 0.1),
opacity 150ms;
pointer-events: none;
// Adjust for right-to-left languages
[dir="rtl"] & {
transform: translateX(px2rem(-25px));
}
}
// Adjust font weight of site title
&:first-child {
font-weight: 700;
}
}
// Header title
&__title {
flex-grow: 1;
height: px2rem(48px);
margin-inline-end: px2rem(8px);
margin-inline-start: px2rem(20px);
font-size: px2rem(18px);
line-height: px2rem(48px);
// Header title in active state, i.e. page title is visible
&[data-md-state="active"] .md-header__topic {
z-index: -1;
transform: translateX(px2rem(-25px));
opacity: 0;
transition:
transform 400ms cubic-bezier(1, 0.7, 0.1, 0.1),
opacity 150ms;
pointer-events: none;
// Adjust for right-to-left languages
[dir="rtl"] & {
transform: translateX(px2rem(25px));
}
// Second header topic - title of the current page
+ .md-header__topic {
z-index: 0;
transform: translateX(0);
opacity: 1;
transition:
transform 400ms cubic-bezier(0.1, 0.7, 0.1, 1),
opacity 150ms;
pointer-events: initial;
}
}
// Add ellipsis in case of overflowing text
> .md-header__ellipsis {
position: relative;
width: 100%;
height: 100%;
}
}
// Header option
&__option {
display: flex;
flex-shrink: 0;
max-width: 100%;
white-space: nowrap;
transition:
max-width 0ms 250ms,
opacity 250ms 250ms;
// Hide toggle when search is active
[data-md-toggle="search"]:checked ~ .md-header & {
max-width: 0;
opacity: 0;
transition:
max-width 0ms,
opacity 0ms;
}
}
// Repository information container
&__source {
display: none;
// [tablet landscape +]: Show repository information
@include break-from-device(tablet landscape) {
display: block;
width: px2rem(234px);
max-width: px2rem(234px);
margin-inline-start: px2rem(20px);
}
// [screen +]: Adjust spacing of search bar
@include break-from-device(screen) {
margin-inline-start: px2rem(28px);
}
}
}
================================================
FILE: mkposters/third_party/stylesheets/main/layout/_nav.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Rules
// ----------------------------------------------------------------------------
// Navigation variables
:root {
--md-nav-icon--prev: svg-load("material/arrow-left.svg");
--md-nav-icon--next: svg-load("material/chevron-right.svg");
--md-toc-icon: svg-load("material/table-of-contents.svg");
}
// ----------------------------------------------------------------------------
// Navigation
.md-nav {
font-size: px2rem(14px);
line-height: 1.3;
// Navigation title
&__title {
display: block;
padding: 0 px2rem(12px);
overflow: hidden;
font-weight: 700;
text-overflow: ellipsis;
// Navigaton button
.md-nav__button {
display: none;
// Stretch images based on height, as it's the smaller dimension
img {
width: auto;
height: 100%;
}
// Button with logo, pointing to `config.site_url`
&.md-logo {
// Image or icon
:is(img, svg) {
display: block;
width: auto;
max-width: 100%;
height: px2rem(48px);
object-fit: contain;
fill: currentcolor;
}
}
}
}
// Navigation list
&__list {
margin: 0;
padding: 0;
list-style: none;
}
// Navigation item
&__item {
padding: 0 px2rem(12px);
// Navigation item on level 2
& & {
padding-inline-end: 0;
}
}
// Navigation link
&__link {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 0.625em;
overflow: hidden;
text-overflow: ellipsis;
cursor: pointer;
transition: color 125ms;
scroll-snap-align: start;
// Navigation link in blurred state
&[data-md-state="blur"] {
color: var(--md-default-fg-color--light);
}
// Active link
.md-nav__item &--active {
color: var(--md-typeset-a-color);
}
// Stretch section index link to full width
.md-nav__item &--index [href] {
width: 100%;
}
// Navigation link on focus/hover
&:is(:focus, :hover) {
color: var(--md-accent-fg-color);
}
// Show outline for keyboard devices
&.focus-visible {
outline-color: var(--md-accent-fg-color);
outline-offset: px2rem(4px);
}
// Navigation link for table of contents
.md-nav--primary &[for="__toc"] {
display: none;
// Table of contents icon
.md-icon::after {
display: block;
width: 100%;
height: 100%;
mask-image: var(--md-toc-icon);
background-color: currentcolor;
}
// Hide table of contents
~ .md-nav {
display: none;
}
}
// Navigation link children (for section indexes)
> * {
display: flex;
cursor: pointer;
}
}
// Navigation icon
&__icon {
flex-shrink: 0;
}
// Repository information container
&__source {
display: none;
}
// [tablet -]: Layered navigation
@include break-to-device(tablet) {
// Primary and nested navigation
&--primary,
&--primary & {
position: absolute;
top: 0;
inset-inline: 0;
z-index: 1;
display: flex;
flex-direction: column;
height: 100%;
background-color: var(--md-default-bg-color);
}
// Primary navigation
&--primary {
// Navigation title and item
:is(.md-nav__title, .md-nav__item) {
font-size: px2rem(16px);
line-height: 1.5;
}
// Navigation title
.md-nav__title {
position: relative;
height: px2rem(112px);
padding: px2rem(60px) px2rem(16px) px2rem(4px);
color: var(--md-default-fg-color--light);
font-weight: 400;
line-height: px2rem(48px);
white-space: nowrap;
background-color: var(--md-default-fg-color--lightest);
cursor: pointer;
// Navigation icon
.md-nav__icon {
position: absolute;
top: px2rem(8px);
inset-inline-start: px2rem(8px);
display: block;
width: px2rem(24px);
height: px2rem(24px);
margin: px2rem(4px);
// Navigation icon in link to previous level
&::after {
display: block;
width: 100%;
height: 100%;
background-color: currentcolor;
mask-image: var(--md-nav-icon--prev);
mask-repeat: no-repeat;
mask-size: contain;
content: "";
}
}
// Navigation list
~ .md-nav__list {
overflow-y: auto;
background-color: var(--md-default-bg-color);
box-shadow:
0 px2rem(1px) 0 var(--md-default-fg-color--lightest) inset;
scroll-snap-type: y mandatory;
touch-action: pan-y;
// Omit border on first child
> :first-child {
border-top: 0;
}
}
// Top-level navigation title
&[for="__drawer"] {
color: var(--md-primary-bg-color);
font-weight: 700;
background-color: var(--md-primary-fg-color);
}
// Button with logo, pointing to `config.site_url`
.md-logo {
position: absolute;
top: px2rem(4px);
inset-inline: px2rem(4px);
display: block;
margin: px2rem(4px);
padding: px2rem(8px);
}
}
// Navigation list
.md-nav__list {
flex: 1;
}
// Navigation item
.md-nav__item {
padding: 0;
border-top: px2rem(1px) solid var(--md-default-fg-color--lightest);
// Navigation link in active navigation
&--active > .md-nav__link {
color: var(--md-typeset-a-color);
// Navigation link on focus/hover
&:is(:focus, :hover) {
color: var(--md-accent-fg-color);
}
}
}
// Navigation link
.md-nav__link {
margin-top: 0;
padding: px2rem(12px) px2rem(16px);
// Navigation icon
.md-nav__icon {
width: px2rem(24px);
height: px2rem(24px);
margin-inline-end: px2rem(-4px);
font-size: px2rem(24px);
// Navigation icon in link to next level
&::after {
display: block;
width: 100%;
height: 100%;
background-color: currentcolor;
mask-image: var(--md-nav-icon--next);
mask-repeat: no-repeat;
mask-size: contain;
content: "";
}
}
}
// Flip icon vertically
.md-nav__icon {
// Adjust for right-to-left languages
[dir="rtl"] &::after {
transform: scale(-1);
}
}
// Table of contents contained in primary navigation
.md-nav--secondary {
// Navigation on level 2-6
.md-nav {
position: static;
background-color: transparent;
// Navigation link on level 3
.md-nav__link {
padding-inline-start: px2rem(28px);
}
// Navigation link on level 4
.md-nav .md-nav__link {
padding-inline-start: px2rem(40px);
}
// Navigation link on level 5
.md-nav .md-nav .md-nav__link {
padding-inline-start: px2rem(52px);
}
// Navigation link on level 6
.md-nav .md-nav .md-nav .md-nav__link {
padding-inline-start: px2rem(64px);
}
}
}
}
// Table of contents
&--secondary {
background-color: transparent;
}
// Toggle for nested navigation
&__toggle ~ & {
display: flex;
transform: translateX(100%);
opacity: 0;
transition:
transform 250ms cubic-bezier(0.8, 0, 0.6, 1),
opacity 125ms 50ms;
// Adjust for right-to-left languages
[dir="rtl"] & {
transform: translateX(-100%);
}
}
// Show nested navigation when toggle is active
&__toggle:checked ~ & {
transform: translateX(0);
opacity: 1;
transition:
transform 250ms cubic-bezier(0.4, 0, 0.2, 1),
opacity 125ms 125ms;
// Navigation list
> .md-nav__list {
// Hack: promote to own layer to reduce jitter
backface-visibility: hidden;
}
}
}
// [tablet portrait -]: Layered navigation with table of contents
@include break-to-device(tablet portrait) {
// Show link to table of contents
&--primary &__link[for="__toc"] {
display: flex;
// Show table of contents icon
.md-icon::after {
content: "";
}
// Hide navigation link to current page
+ .md-nav__link {
display: none;
}
// Show table of contents
~ .md-nav {
display: flex;
}
}
// Repository information container
&__source {
display: block;
padding: 0 px2rem(4px);
color: var(--md-primary-bg-color);
background-color: var(--md-primary-fg-color--dark);
}
}
// [tablet landscape]: Layered navigation with table of contents
@include break-at-device(tablet landscape) {
// Show link to integrated table of contents
&--integrated &__link[for="__toc"] {
display: flex;
// Show table of contents icon
.md-icon::after {
content: "";
}
// Hide navigation link to current page
+ .md-nav__link {
display: none;
}
// Show table of contents
~ .md-nav {
display: flex;
}
}
}
// [tablet landscape +]: Tree-like table of contents
@include break-from-device(tablet landscape) {
// Navigation title
&--secondary &__title {
// Adjust snapping behavior
&[for="__toc"] {
scroll-snap-align: start;
}
// Hide navigation icon
.md-nav__icon {
display: none;
}
}
}
// [screen +]: Tree-like navigation
@include break-from-device(screen) {
transition: max-height 250ms cubic-bezier(0.86, 0, 0.07, 1);
// Navigation title
&--primary &__title {
// Adjust snapping behavior
&[for="__drawer"] {
scroll-snap-align: start;
}
// Hide navigation icon
.md-nav__icon {
display: none;
}
}
// Hide toggle for nested navigation
&__toggle ~ & {
display: none;
}
// Show nested navigation when toggle is active or indeterminate
&__toggle:is(:checked, :indeterminate) ~ & {
display: block;
}
// Hide navigation title in nested navigation
&__item--nested > & > &__title {
display: none;
}
// Navigation section
&__item--section {
display: block;
margin: 1.25em 0;
// Adjust spacing on last child
&:last-child {
margin-bottom: 0;
}
// Show navigation link as title
> .md-nav__link {
font-weight: 700;
pointer-events: none;
// Make navigation link clickable
&--index [href] {
pointer-events: initial;
}
// Hide naviation icon
.md-nav__icon {
display: none;
}
}
// Navigation
> .md-nav {
display: block;
// Adjust spacing on next level item
> .md-nav__list > .md-nav__item {
padding: 0;
}
}
}
// Navigation icon
&__icon {
float: right;
width: px2rem(18px);
height: px2rem(18px);
border-radius: 100%;
transition:
background-color 250ms,
transform 250ms;
// Adjust for right-to-left languages
[dir="rtl"] & {
float: left;
transform: rotate(180deg);
}
// Navigation icon on hover
&:hover {
background-color: var(--md-accent-fg-color--transparent);
}
// Navigation icon content
&::after {
display: inline-block;
width: 100%;
height: 100%;
vertical-align: px2rem(-2px);
background-color: currentcolor;
mask-image: var(--md-nav-icon--next);
mask-repeat: no-repeat;
mask-size: contain;
content: "";
}
// Navigation icon - rotate icon when toggle is active or indeterminate
.md-nav__item--nested .md-nav__toggle:checked ~ .md-nav__link &,
.md-nav__item--nested .md-nav__toggle:indeterminate ~ .md-nav__link & {
transform: rotate(90deg);
}
}
// Modifier for when navigation tabs are rendered
&--lifted {
// Hide nested level 0 navigation items and site title
> .md-nav__list > .md-nav__item--nested,
> .md-nav__title {
display: none;
}
// Hide level 0 navigation items
> .md-nav__list > .md-nav__item {
display: none;
// Active parent navigation item
&--active {
display: block;
padding: 0;
// Show navigation link as title
> .md-nav__link {
margin-top: 0;
padding: 0 px2rem(12px);
font-weight: 700;
pointer-events: none;
// Make navigation link clickable
&--index [href] {
pointer-events: initial;
}
// Hide naviation icon
.md-nav__icon {
display: none;
}
}
}
}
// Hack: Always show active navigation tab on breakpoint screen, despite
// of checkbox being checked or not. Fixes #1655.
.md-nav[data-md-level="1"] {
display: block;
// Adjust spacing for level 1 navigation items
> .md-nav__list > .md-nav__item {
padding-inline-end: px2rem(12px);
}
}
}
// Modifier for when table of contents is rendered in primary navigation
&--integrated > .md-nav__list > .md-nav__item--active {
// Add spacing to container for non-nested navigation items
&:not(.md-nav__item--nested) {
padding: 0 px2rem(12px);
// Remove padding as it's given by container
> .md-nav__link {
padding: 0;
}
}
// Show integrated table of contents
.md-nav--secondary {
display: block;
margin-bottom: 1.25em;
border-inline-start: px2rem(1px) solid var(--md-primary-fg-color);
// Hide table of contents title
> .md-nav__title {
display: none;
}
}
}
}
}
================================================
FILE: mkposters/third_party/stylesheets/main/layout/_search.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Rules
// ----------------------------------------------------------------------------
// Search variables
:root {
--md-search-result-icon: svg-load("material/file-search-outline.svg");
}
// ----------------------------------------------------------------------------
// Search
.md-search {
position: relative;
// [tablet landscape +]: Header-embedded search
@include break-from-device(tablet landscape) {
padding: px2rem(4px) 0;
}
// [no-js]: Hide search
.no-js & {
display: none;
}
// Search overlay
&__overlay {
z-index: 1;
opacity: 0;
// [tablet portrait -]: Search modal
@include break-to-device(tablet portrait) {
position: absolute;
top: px2rem(-20px);
inset-inline-start: px2rem(-44px);
width: px2rem(40px);
height: px2rem(40px);
overflow: hidden;
background-color: var(--md-default-bg-color);
border-radius: px2rem(20px);
transform-origin: center;
transition:
transform 300ms 100ms,
opacity 200ms 200ms;
pointer-events: none;
// Show overlay when search is active
[data-md-toggle="search"]:checked ~ .md-header & {
opacity: 1;
transition:
transform 400ms,
opacity 100ms;
}
}
// [tablet landscape +]: Header-embedded search
@include break-from-device(tablet landscape) {
position: fixed;
top: 0;
inset-inline-start: 0;
width: 0;
height: 0;
background-color: hsla(0, 0%, 0%, 0.54);
cursor: pointer;
transition:
width 0ms 250ms,
height 0ms 250ms,
opacity 250ms;
// Show overlay when search is active
[data-md-toggle="search"]:checked ~ .md-header & {
width: 100%;
// Hack: when the header is translated upon scrolling, a new layer is
// induced, which means that the height will now refer to the height of
// the header, albeit positioning is fixed. This should be mitigated
// in all cases when setting the height to 2x the viewport.
height: 200vh;
opacity: 1;
transition:
width 0ms,
height 0ms,
opacity 250ms;
}
}
// Adjust appearance when search is active
[data-md-toggle="search"]:checked ~ .md-header & {
// [mobile portrait -]: Scale up 45 times
@include break-to-device(mobile portrait) {
transform: scale(45);
}
// [mobile landscape]: Scale up 60 times
@include break-at-device(mobile landscape) {
transform: scale(60);
}
// [tablet portrait]: Scale up 75 times
@include break-at-device(tablet portrait) {
transform: scale(75);
}
}
}
// Search wrapper
&__inner {
// Hack: promote to own layer to reduce jitter
backface-visibility: hidden;
// [tablet portrait -]: Search modal
@include break-to-device(tablet portrait) {
position: fixed;
top: 0;
inset-inline-start: 0;
z-index: 2;
width: 0;
height: 0;
overflow: hidden;
transform: translateX(5%);
opacity: 0;
transition:
width 0ms 300ms,
height 0ms 300ms,
transform 150ms 150ms cubic-bezier(0.4, 0, 0.2, 1),
opacity 150ms 150ms;
// Adjust for right-to-left languages
[dir="rtl"] & {
transform: translateX(-5%);
}
// Adjust appearance when search is active
[data-md-toggle="search"]:checked ~ .md-header & {
width: 100%;
height: 100%;
transform: translateX(0);
opacity: 1;
transition:
width 0ms 0ms,
height 0ms 0ms,
transform 150ms 150ms cubic-bezier(0.1, 0.7, 0.1, 1),
opacity 150ms 150ms;
}
}
// [tablet landscape +]: Header-embedded search
@include break-from-device(tablet landscape) {
position: relative;
float: right;
width: px2rem(234px);
padding: px2rem(2px) 0;
transition: width 250ms cubic-bezier(0.1, 0.7, 0.1, 1);
// Adjust for right-to-left languages
[dir="rtl"] & {
float: left;
}
}
// Adjust appearance when search is active
[data-md-toggle="search"]:checked ~ .md-header & {
// [tablet landscape]: Omit overlaying header title
@include break-at-device(tablet landscape) {
width: px2rem(468px);
}
// [screen +]: Match width of content area
@include break-from-device(screen) {
width: px2rem(688px);
}
}
}
// Search form
&__form {
position: relative;
z-index: 2;
height: px2rem(48px);
background-color: var(--md-default-bg-color);
box-shadow: 0 0 px2rem(12px) transparent;
transition:
color 250ms,
background-color 250ms;
// [tablet landscape +]: Header-embedded search
@include break-from-device(tablet landscape) {
height: px2rem(36px);
background-color: hsla(0, 0%, 0%, 0.26);
border-radius: px2rem(2px);
// Search form on hover
&:hover {
background-color: hsla(0, 0%, 100%, 0.12);
}
}
// Adjust appearance when search is active
[data-md-toggle="search"]:checked ~ .md-header & {
color: var(--md-default-fg-color);
background-color: var(--md-default-bg-color);
border-radius: px2rem(2px) px2rem(2px) 0 0;
box-shadow: 0 0 px2rem(12px) hsla(0, 0%, 0%, 0.07);
}
}
// Search input
&__input {
position: relative;
z-index: 2;
width: 100%;
height: 100%;
padding-inline: px2rem(72px) px2rem(44px);
font-size: px2rem(18px);
text-overflow: ellipsis;
background: transparent;
// Search placeholder
&::placeholder {
transition: color 250ms;
}
// Search icon and placeholder
~ .md-search__icon,
&::placeholder {
color: var(--md-default-fg-color--light);
}
// Remove the "x" rendered by Internet Explorer
&::-ms-clear {
display: none;
}
// [tablet portrait -]: Search modal
@include break-to-device(tablet portrait) {
width: 100%;
height: px2rem(48px);
font-size: px2rem(18px);
}
// [tablet landscape +]: Header-embedded search
@include break-from-device(tablet landscape) {
padding-inline-start: px2rem(44px);
color: inherit;
font-size: px2rem(16px);
// Search placeholder
&::placeholder {
color: var(--md-primary-bg-color--light);
}
// Search icon
+ .md-search__icon {
color: var(--md-primary-bg-color);
}
// Adjust appearance when search is active
[data-md-toggle="search"]:checked ~ .md-header & {
text-overflow: clip;
// Search icon and placeholder
+ .md-search__icon,
&::placeholder {
color: var(--md-default-fg-color--light);
}
}
}
}
// Search icon
&__icon {
display: inline-block;
width: px2rem(24px);
height: px2rem(24px);
cursor: pointer;
transition:
color 250ms,
opacity 250ms;
// Search icon on hover
&:hover {
opacity: 0.7;
}
// Search focus button
&[for="__search"] {
position: absolute;
top: px2rem(6px);
inset-inline-start: px2rem(10px);
z-index: 2;
// Adjust for right-to-left languages
[dir="rtl"] & svg {
transform: scaleX(-1);
}
// [tablet portrait -]: Search modal
@include break-to-device(tablet portrait) {
top: px2rem(12px);
inset-inline-start: px2rem(16px);
// Hide the magnifying glass
svg:first-child {
display: none;
}
}
// [tablet landscape +]: Header-embedded search
@include break-from-device(tablet landscape) {
pointer-events: none;
// Hide the back arrow
svg:last-child {
display: none;
}
}
}
}
// Search options
&__options {
position: absolute;
top: px2rem(6px);
inset-inline-end: px2rem(10px);
z-index: 2;
pointer-events: none;
// [tablet portrait -]: Search modal
@include break-to-device(tablet portrait) {
top: px2rem(12px);
inset-inline-end: px2rem(16px);
}
// Search option buttons
> * {
margin-inline-start: px2rem(4px);
color: var(--md-default-fg-color--light);
transform: scale(0.75);
opacity: 0;
transition:
transform 150ms cubic-bezier(0.1, 0.7, 0.1, 1),
opacity 150ms;
// Hide outline for pointer devices
&:not(.focus-visible) {
outline: none;
-webkit-tap-highlight-color: transparent;
}
// Show reset button when search is active and input non-empty
[data-md-toggle="search"]:checked ~ .md-header
.md-search__input:valid ~ & {
transform: scale(1);
opacity: 1;
pointer-events: initial;
// Search focus icon
&:hover {
opacity: 0.7;
}
}
}
}
// Search suggestions
&__suggest {
position: absolute;
top: 0;
display: flex;
align-items: center;
width: 100%;
height: 100%;
padding-inline: px2rem(72px) px2rem(44px);
color: var(--md-default-fg-color--lighter);
font-size: px2rem(18px);
white-space: nowrap;
opacity: 0;
transition: opacity 50ms;
// [tablet landscape +]: Header-embedded search
@include break-from-device(tablet landscape) {
padding-inline-start: px2rem(44px);
font-size: px2rem(16px);
}
// Show suggestions when search is active
[data-md-toggle="search"]:checked ~ .md-header & {
opacity: 1;
transition: opacity 300ms 100ms;
}
}
// Search output
&__output {
position: absolute;
z-index: 1;
width: 100%;
overflow: hidden;
border-end-start-radius: px2rem(2px);
border-end-end-radius: px2rem(2px);
// [tablet portrait -]: Search modal
@include break-to-device(tablet portrait) {
top: px2rem(48px);
bottom: 0;
}
// [tablet landscape +]: Header-embedded search
@include break-from-device(tablet landscape) {
top: px2rem(38px);
opacity: 0;
transition: opacity 400ms;
// Show output when search is active
[data-md-toggle="search"]:checked ~ .md-header & {
box-shadow: var(--md-shadow-z3);
opacity: 1;
}
}
}
// Search scroll wrapper
&__scrollwrap {
height: 100%;
overflow-y: auto;
background-color: var(--md-default-bg-color);
// Hack: promote to own layer to reduce jitter
backface-visibility: hidden;
// Hack: Chrome 88+ has weird overscroll behavior. Overall, scroll snapping
// seems to be something that is not ready for prime time on some browsers.
// scroll-snap-type: y mandatory;
touch-action: pan-y;
// Mitigiate excessive repaints on non-retina devices
@media (max-resolution: 1dppx) {
transform: translateZ(0);
}
// [tablet landscape]: Set fixed width to omit unnecessary reflow
@include break-at-device(tablet landscape) {
width: px2rem(468px);
}
// [screen +]: Set fixed width to omit unnecessary reflow
@include break-from-device(screen) {
width: px2rem(688px);
}
// [tablet landscape +]: Limit height to viewport
@include break-from-device(tablet landscape) {
max-height: 0;
scrollbar-width: thin;
scrollbar-color: var(--md-default-fg-color--lighter) transparent;
// Show scroll wrapper when search is active
[data-md-toggle="search"]:checked ~ .md-header & {
max-height: 75vh;
}
// Search scroll wrapper on hover
&:hover {
scrollbar-color: var(--md-accent-fg-color) transparent;
}
// Webkit scrollbar
&::-webkit-scrollbar {
width: px2rem(4px);
height: px2rem(4px);
}
// Webkit scrollbar thumb
&::-webkit-scrollbar-thumb {
background-color: var(--md-default-fg-color--lighter);
// Webkit scrollbar thumb on hover
&:hover {
background-color: var(--md-accent-fg-color);
}
}
}
}
}
// Search result
.md-search-result {
color: var(--md-default-fg-color);
word-break: break-word;
// Search result metadata
&__meta {
padding: 0 px2rem(16px);
color: var(--md-default-fg-color--light);
font-size: px2rem(12.8px);
line-height: px2rem(36px);
background-color: var(--md-default-fg-color--lightest);
scroll-snap-align: start;
// [tablet landscape +]: Adjust spacing
@include break-from-device(tablet landscape) {
padding-inline-start: px2rem(44px);
}
}
// Search result list
&__list {
margin: 0;
padding: 0;
list-style: none;
}
// Search result item
&__item {
box-shadow: 0 px2rem(-1px) var(--md-default-fg-color--lightest);
// Omit border on first child
&:first-child {
box-shadow: none;
}
}
// Search result link
&__link {
display: block;
outline: none;
transition: background-color 250ms;
scroll-snap-align: start;
// Search result link on focus/hover
&:is(:focus, :hover) {
background-color: var(--md-accent-fg-color--transparent);
}
// Adjust spacing on last child of last link
&:last-child p:last-child {
margin-bottom: px2rem(12px);
}
}
// Search result more link
&__more summary {
display: block;
padding: px2em(12px) px2rem(16px);
color: var(--md-typeset-a-color);
font-size: px2rem(12.8px);
outline: none;
cursor: pointer;
transition:
color 250ms,
background-color 250ms;
scroll-snap-align: start;
// [tablet landscape +]: Adjust spacing
@include break-from-device(tablet landscape) {
padding-inline-start: px2rem(44px);
}
// Search result more link on focus/hover
&:is(:focus, :hover) {
color: var(--md-accent-fg-color);
background-color: var(--md-accent-fg-color--transparent);
}
// Hide native details marker - modern
&::marker {
display: none;
}
// Hide native details marker - legacy, must be split into a seprate rule,
// so older browsers don't consider the selector list as invalid
&::-webkit-details-marker {
display: none;
}
// Adjust transparency of less relevant results
~ * > * {
opacity: 0.65;
}
}
// Search result article
&__article {
position: relative;
padding: 0 px2rem(16px);
overflow: hidden;
// [tablet landscape +]: Adjust spacing
@include break-from-device(tablet landscape) {
padding-inline-start: px2rem(44px);
}
// Search result article document
&--document {
// Search result title
.md-search-result__title {
margin: px2rem(11px) 0;
font-weight: 400;
font-size: px2rem(16px);
line-height: 1.4;
}
}
}
// Search result icon
&__icon {
position: absolute;
inset-inline-start: 0;
width: px2rem(24px);
height: px2rem(24px);
margin: px2rem(10px);
color: var(--md-default-fg-color--light);
// [tablet portrait -]: Hide icon
@include break-to-device(tablet portrait) {
display: none;
}
// Search result icon content
&::after {
display: inline-block;
width: 100%;
height: 100%;
background-color: currentcolor;
mask-image: var(--md-search-result-icon);
mask-repeat: no-repeat;
mask-size: contain;
content: "";
// Adjust for right-to-left languages
[dir="rtl"] & {
transform: scaleX(-1);
}
}
}
// Search result title
&__title {
margin: 0.5em 0;
font-weight: 700;
font-size: px2rem(12.8px);
line-height: 1.6;
}
// Search result teaser
&__teaser {
display: -webkit-box;
max-height: px2rem(40px);
margin: 0.5em 0;
overflow: hidden;
color: var(--md-default-fg-color--light);
font-size: px2rem(12.8px);
line-height: 1.6;
text-overflow: ellipsis;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
// [mobile -]: Adjust number of lines
@include break-to-device(mobile) {
max-height: px2rem(60px);
-webkit-line-clamp: 3;
}
// [tablet landscape]: Adjust number of lines
@include break-at-device(tablet landscape) {
max-height: px2rem(60px);
-webkit-line-clamp: 3;
}
// Search term highlighting
mark {
text-decoration: underline;
background-color: transparent;
}
}
// Search result terms
&__terms {
margin: 0.5em 0;
font-size: px2rem(12.8px);
font-style: italic;
}
// Search term highlighting
mark {
color: var(--md-accent-fg-color);
background-color: transparent;
}
}
================================================
FILE: mkposters/third_party/stylesheets/main/layout/_select.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Rules
// ----------------------------------------------------------------------------
// Selection
.md-select {
position: relative;
z-index: 1;
// Selection tooltip
&__inner {
position: absolute;
top: calc(100% - #{px2rem(4px)});
left: 50%;
max-height: 0;
margin-top: px2rem(4px);
color: var(--md-default-fg-color);
background-color: var(--md-default-bg-color);
border-radius: px2rem(2px);
box-shadow: var(--md-shadow-z2);
transform: translate3d(-50%, px2rem(6px), 0);
opacity: 0;
transition:
transform 250ms 375ms,
opacity 250ms 250ms,
max-height 0ms 500ms;
// Selection bubble on parent focus/hover
.md-select:is(:focus-within, :hover) & {
max-height: px2rem(200px);
transform: translate3d(-50%, 0, 0);
opacity: 1;
transition:
transform 250ms cubic-bezier(0.1, 0.7, 0.1, 1),
opacity 250ms,
max-height 0ms;
}
// Selection bubble handle
&::after {
position: absolute;
top: 0;
left: 50%;
width: 0;
height: 0;
margin-top: px2rem(-4px);
margin-left: px2rem(-4px);
border: px2rem(4px) solid transparent;
border-top: 0;
border-bottom-color: var(--md-default-bg-color);
content: "";
}
}
// Selection list
&__list {
max-height: inherit;
margin: 0;
padding: 0;
overflow: auto;
font-size: px2rem(16px);
list-style-type: none;
border-radius: px2rem(2px);
}
// Selection item
&__item {
line-height: px2rem(36px);
}
// Selection link
&__link {
display: block;
width: 100%;
padding-inline: px2rem(12px) px2rem(24px);
outline: none;
cursor: pointer;
transition:
background-color 250ms,
color 250ms;
scroll-snap-align: start;
// Link on focus/hover
&:is(:focus, :hover) {
color: var(--md-accent-fg-color);
}
// Link on focus
&:focus {
background-color: var(--md-default-fg-color--lightest);
}
}
}
================================================
FILE: mkposters/third_party/stylesheets/main/layout/_sidebar.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Rules
// ----------------------------------------------------------------------------
// Sidebar
.md-sidebar {
position: sticky;
top: px2rem(48px);
flex-shrink: 0;
align-self: flex-start;
width: px2rem(242px);
padding: px2rem(24px) 0;
// [print]: Hide sidebar
@media print {
display: none;
}
// [tablet -]: Show navigation as drawer
@include break-to-device(tablet) {
// Primary sidebar with navigation
&--primary {
position: fixed;
top: 0;
inset-inline-start: px2rem(-242px);
z-index: 5;
display: block;
width: px2rem(242px);
height: 100%;
background-color: var(--md-default-bg-color);
transform: translateX(0);
transition:
transform 250ms cubic-bezier(0.4, 0, 0.2, 1),
box-shadow 250ms;
// Show sidebar when drawer is active
[data-md-toggle="drawer"]:checked ~ .md-container & {
box-shadow: var(--md-shadow-z3);
transform: translateX(px2rem(242px));
// Adjust for right-to-left languages
[dir="rtl"] & {
transform: translateX(px2rem(-242px));
}
}
// Stretch scroll wrapper for primary sidebar
.md-sidebar__scrollwrap {
position: absolute;
inset: 0;
margin: 0;
scroll-snap-type: none;
overflow: hidden;
}
}
}
// [screen +]: Show navigation as sidebar
@include break-from-device(screen) {
height: 0;
// [no-js]: Switch to native sticky behavior
.no-js & {
height: auto;
}
}
// Secondary sidebar with table of contents
&--secondary {
display: none;
order: 2;
// [tablet landscape +]: Show table of contents as sidebar
@include break-from-device(tablet landscape) {
height: 0;
// [no-js]: Switch to native sticky behavior
.no-js & {
height: auto;
}
// Sidebar is visible
&:not([hidden]) {
display: block;
}
// Ensure smooth scrolling on iOS
.md-sidebar__scrollwrap {
touch-action: pan-y;
}
}
}
// Sidebar scroll wrapper
&__scrollwrap {
margin: 0 px2rem(4px);
overflow-y: auto;
// Hack: promote to own layer to reduce jitter
backface-visibility: hidden;
// Hack: Chrome 81+ exhibits a strange bug, where it scrolls the container
// to the bottom if `scroll-snap-type` is set on the initial render. For
// this reason, we disable scroll snapping until this is resolved (#1667).
// scroll-snap-type: y mandatory;
scrollbar-width: thin;
scrollbar-color: var(--md-default-fg-color--lighter) transparent;
// Sidebar scroll wrapper on hover
&:hover {
scrollbar-color: var(--md-accent-fg-color) transparent;
}
// Webkit scrollbar
&::-webkit-scrollbar {
width: px2rem(4px);
height: px2rem(4px);
}
// Webkit scrollbar thumb
&::-webkit-scrollbar-thumb {
background-color: var(--md-default-fg-color--lighter);
// Webkit scrollbar thumb on hover
&:hover {
background-color: var(--md-accent-fg-color);
}
}
}
}
// [tablet -]: Show overlay on active drawer
@include break-to-device(tablet) {
// Drawer overlay
.md-overlay {
position: fixed;
top: 0;
z-index: 5;
width: 0;
height: 0;
background-color: hsla(0, 0%, 0%, 0.54);
opacity: 0;
transition:
width 0ms 250ms,
height 0ms 250ms,
opacity 250ms;
// Show overlay when drawer is active
[data-md-toggle="drawer"]:checked ~ & {
width: 100%;
height: 100%;
opacity: 1;
transition:
width 0ms,
height 0ms,
opacity 250ms;
}
}
}
================================================
FILE: mkposters/third_party/stylesheets/main/layout/_source.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Keyframes
// ----------------------------------------------------------------------------
// Show repository facts
@keyframes facts {
0% {
height: 0;
}
100% {
height: px2rem(13px);
}
}
// Show repository fact
@keyframes fact {
0% {
transform: translateY(100%);
opacity: 0;
}
50% {
opacity: 0;
}
100% {
transform: translateY(0%);
opacity: 1;
}
}
// ----------------------------------------------------------------------------
// Rules
// ----------------------------------------------------------------------------
// Repository information variables
:root {
--md-source-forks-icon: svg-load("octicons/repo-forked-16.svg");
--md-source-repositories-icon: svg-load("octicons/repo-16.svg");
--md-source-stars-icon: svg-load("octicons/star-16.svg");
--md-source-version-icon: svg-load("octicons/tag-16.svg");
}
// ----------------------------------------------------------------------------
// Repository information
.md-source {
display: block;
font-size: px2rem(13px);
line-height: 1.2;
white-space: nowrap;
outline-color: var(--md-accent-fg-color);
// Hack: promote to own layer to reduce jitter
backface-visibility: hidden;
transition: opacity 250ms;
// Repository information on hover
&:hover {
opacity: 0.7;
}
// Repository icon
&__icon {
display: inline-block;
width: px2rem(40px);
height: px2rem(48px);
vertical-align: middle;
// Align with margin only (as opposed to normal button alignment)
svg {
margin-top: px2rem(12px);
margin-inline-start: px2rem(12px);
}
// Adjust spacing if icon is present
+ .md-source__repository {
margin-inline-start: px2rem(-40px);
padding-inline-start: px2rem(40px);
}
}
// Repository name
&__repository {
display: inline-block;
max-width: calc(100% - #{px2rem(24px)});
margin-inline-start: px2rem(12px);
overflow: hidden;
text-overflow: ellipsis;
vertical-align: middle;
}
// Repository facts
&__facts {
margin: px2rem(2px) 0 0;
padding: 0;
overflow: hidden;
font-size: px2rem(11px);
list-style-type: none;
opacity: 0.75;
// Show after the data was loaded
[data-md-state="done"] & {
animation: facts 250ms ease-in;
}
}
// Repository fact
&__fact {
display: inline-block;
// Show after the data was loaded
[data-md-state="done"] & {
animation: fact 400ms ease-out;
}
// Repository fact icon
&::before {
display: inline-block;
width: px2rem(12px);
height: px2rem(12px);
margin-inline-end: px2rem(2px);
vertical-align: text-top;
background-color: currentcolor;
mask-repeat: no-repeat;
mask-size: contain;
content: "";
}
// Adjust spacing for repository fact icon
&:nth-child(1n+2)::before {
margin-inline-start: px2rem(8px);
}
// Repository fact: version
&--version::before {
mask-image: var(--md-source-version-icon);
}
// Repository fact: stars
&--stars::before {
mask-image: var(--md-source-stars-icon);
}
// Repository fact: forks
&--forks::before {
mask-image: var(--md-source-forks-icon);
}
// Repository fact: repositories
&--repositories::before {
mask-image: var(--md-source-repositories-icon);
}
}
}
================================================
FILE: mkposters/third_party/stylesheets/main/layout/_tabs.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Rules
// ----------------------------------------------------------------------------
// Navigation tabs
.md-tabs {
width: 100%;
overflow: auto;
color: var(--md-primary-bg-color);
background-color: var(--md-primary-fg-color);
// [print]: Hide tabs
@media print {
display: none;
}
// [tablet -]: Hide tabs
@include break-to-device(tablet) {
display: none;
}
// Tabs in hidden state, i.e. when scrolling down
&[data-md-state="hidden"] {
pointer-events: none;
}
// Navigation tabs list
&__list {
margin: 0;
margin-inline-start: px2rem(4px);
padding: 0;
white-space: nowrap;
list-style: none;
contain: content;
}
// Navigation tabs item
&__item {
display: inline-block;
height: px2rem(48px);
padding-inline: px2rem(12px);
}
// Navigation tabs link - could be defined as block elements and aligned via
// line height, but this would imply more repaints when scrolling
&__link {
display: block;
margin-top: px2rem(16px);
font-size: px2rem(14px);
outline-color: var(--md-accent-fg-color);
outline-offset: px2rem(4px);
// Hack: save a repaint when tabs are appearing on scrolling up
backface-visibility: hidden;
opacity: 0.7;
transition:
transform 400ms cubic-bezier(0.1, 0.7, 0.1, 1),
opacity 250ms;
// Active link and link on focus/hover
&--active,
&:is(:focus, :hover) {
color: inherit;
opacity: 1;
}
// Delay transitions by a small amount
@for $i from 2 through 16 {
.md-tabs__item:nth-child(#{$i}) & {
transition-delay: 20ms * ($i - 1);
}
}
// Hide tabs upon scrolling - disable transition to minimizes repaints
// while scrolling down, while scrolling up seems to be okay
.md-tabs[data-md-state="hidden"] & {
transform: translateY(50%);
opacity: 0;
transition:
transform 0ms 100ms,
opacity 100ms;
}
}
}
================================================
FILE: mkposters/third_party/stylesheets/main/layout/_tag.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Rules
// ----------------------------------------------------------------------------
// Tag list
.md-tags {
margin-bottom: px2em(12px);
}
// Tag
.md-tag {
display: inline-block;
margin-inline-end: 0.5em;
margin-bottom: 0.5em;
padding: px2em(4px, 12.8px) px2em(12px, 12.8px);
font-weight: 700;
font-size: px2rem(12.8px);
line-height: 1.6;
background: var(--md-default-fg-color--lightest);
border-radius: px2rem(8px);
// Linked tag
&[href] {
color: inherit;
outline: none;
-webkit-tap-highlight-color: transparent;
transition:
color 125ms,
background-color 125ms;
// Linked tag on focus/hover
&:focus,
&:hover {
color: var(--md-accent-bg-color);
background-color: var(--md-accent-fg-color);
}
}
// Tag inside headline
[id] > & {
vertical-align: text-top;
}
}
================================================
FILE: mkposters/third_party/stylesheets/main/layout/_tooltip.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Keyframes
// ----------------------------------------------------------------------------
// Continuous pulse animation
@keyframes pulse {
0% {
box-shadow: 0 0 0 0 var(--md-default-fg-color--lightest);
}
75% {
box-shadow: 0 0 0 px2em(10px) transparent;
}
100% {
box-shadow: 0 0 0 0 transparent;
}
}
// ----------------------------------------------------------------------------
// Rules
// ----------------------------------------------------------------------------
// Tooltip variables
:root {
--md-tooltip-width: #{px2rem(400px)};
}
// ----------------------------------------------------------------------------
// Tooltip
.md-tooltip {
position: absolute;
top: var(--md-tooltip-y);
left:
clamp(
var(--md-tooltip-0, #{px2rem(0px)}) + #{px2rem(16px)},
var(--md-tooltip-x),
(
100vw +
var(--md-tooltip-0, #{px2rem(0px)}) + #{px2rem(16px)} -
var(--md-tooltip-width) -
2 * #{px2rem(16px)}
)
);
// Hack: set an explicit `z-index` so we can transition it to ensure that any
// following elements are not overlaying the tooltip during the transition.
z-index: 0;
width: var(--md-tooltip-width);
max-width: calc(100vw - 2 * #{px2rem(16px)});
max-height: 0;
color: var(--md-default-fg-color);
background-color: var(--md-default-bg-color);
border-radius: px2rem(2px);
box-shadow: var(--md-shadow-z2);
transform: translateY(px2rem(-8px));
// Hack: promote to own layer to reduce jitter
backface-visibility: hidden;
opacity: 0;
transition:
transform 0ms 250ms,
opacity 250ms,
max-height 0ms 250ms,
z-index 250ms;
// Tooltip on parent focus
:focus-within > & {
max-height: 1000%;
transform: translateY(0);
opacity: 1;
transition:
transform 250ms cubic-bezier(0.1, 0.7, 0.1, 1),
opacity 250ms,
max-height 250ms,
z-index 0ms;
}
// Show outline for keyboard devices
.focus-visible > & {
outline: var(--md-accent-fg-color) auto;
}
// Tooltip wrapper
&__inner {
padding: px2rem(16px);
font-size: px2rem(12.8px);
// Adjust spacing on first child
&.md-typeset > :first-child {
margin-top: 0;
}
// Adjust spacing on last child
&.md-typeset > :last-child {
margin-bottom: 0;
}
}
}
// ----------------------------------------------------------------------------
// Annotation
.md-annotation {
white-space: normal;
outline: none;
// Adjust for right-to-left languages
[dir="rtl"] & {
direction: rtl;
}
// Annotation is not hidden (e.g. when copying)
&:not([hidden]) {
display: inline-block;
// Hack: ensure that the line height doesn't exceed the line height of the
// hosting line, because it will lead to dancing pixels.
line-height: 1.325;
}
// Promote children to top on focus
&:focus-within > * {
z-index: 2;
}
// Annotation wrapper (= tooltip)
&__inner {
top: calc(var(--md-tooltip-y) + 1.2ch);
font-family: var(--md-text-font-family);
// Annotation tooltip when not focused
:not(:focus-within) > & {
user-select: none;
pointer-events: none;
}
}
// Annotation index
&__index {
position: relative;
z-index: 0;
margin: 0 1ch;
color: hsla(0, 0%, 100%, 1);
cursor: pointer;
transition: z-index 250ms;
user-select: none;
// Annotation marker – the marker must be positioned absolutely behind
// the index, because it shouldn't impact the rendering of a code block.
// Otherwise, small rounding differences in browsers can sometimes mess up
// alignment of text following an annotation.
&::after {
position: absolute;
top: 0.025em;
left: -0.126em;
z-index: -1;
// Hack: the first property is used as a fallback for older browsers
// which don't support the min/max/clamp math functions.
width: calc(100% + 1.2ch);
width: max(2.2ch, 100% + 1.2ch);
height: 2.2ch;
margin: 0 -0.4ch;
padding: 0 0.4ch;
background-color: var(--md-default-fg-color--lighter);
border-radius: 2ch;
transition:
color 250ms,
background-color 250ms;
animation: pulse 2000ms infinite;
content: "";
// [reduced motion]: Disable animation
@media (prefers-reduced-motion) {
animation: none;
}
// Annotation marker on focus/hover
:is(:focus-within, :hover) > & {
background-color: var(--md-accent-fg-color);
}
// Annotation marker on focus
:focus-within > & {
transition:
color 250ms,
background-color 250ms;
animation: none;
}
}
// Annotation marker content
[data-md-annotation-id]::before {
display: inline-block;
transition: transform 400ms cubic-bezier(0.1, 0.7, 0.1, 1);
content: attr(data-md-annotation-id);
// [not print]: if we're not in print mode, show a `+` sign instead of
// the original numbers, as context is already given by the position.
@media not print {
content: "+";
// Annotation marker content on focus
:focus-within > & {
transform: rotate(45deg);
}
}
}
// Annotation index on focus/hover
:is(:focus-within, :hover) > & {
color: var(--md-accent-bg-color);
}
// Annotation index on focus
:focus-within > & {
transition: none;
animation: none;
}
}
}
================================================
FILE: mkposters/third_party/stylesheets/main/layout/_top.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Rules
// ----------------------------------------------------------------------------
// Back-to-top button
.md-top {
position: fixed;
top: px2rem(48px + 16px);
z-index: 2;
margin-inline-start: 50%;
padding: px2rem(8px) px2rem(16px);
color: var(--md-default-fg-color--light);
font-size: px2rem(14px);
background-color: var(--md-default-bg-color);
border-radius: px2rem(32px);
outline: none;
box-shadow: var(--md-shadow-z2);
transform: translate(-50%, 0);
transition:
color 125ms,
background-color 125ms,
transform 125ms cubic-bezier(0.4, 0, 0.2, 1),
opacity 125ms;
// [print]: Hide back-to-top button
@media print {
display: none;
}
// Adjust for right-to-left languages
[dir="rtl"] & {
transform: translate(50%, 0);
}
// Back-to-top button in hidden state
&[data-md-state="hidden"] {
transform: translate(-50%, px2rem(4px));
opacity: 0;
transition-duration: 0ms;
pointer-events: none;
// Adjust for right-to-left languages
[dir="rtl"] & {
transform: translate(50%, px2rem(4px));
}
}
// Back-to-top button on focus/hover
&:is(:focus, :hover) {
color: var(--md-accent-bg-color);
background-color: var(--md-accent-fg-color);
}
// Inline icon
svg {
display: inline-block;
vertical-align: -0.5em;
}
}
================================================
FILE: mkposters/third_party/stylesheets/main/layout/_version.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Keyframes
// ----------------------------------------------------------------------------
// See https://github.com/squidfunk/mkdocs-material/issues/2429
@keyframes hoverfix {
0% {
pointer-events: none;
}
}
// ----------------------------------------------------------------------------
// Rules
// ----------------------------------------------------------------------------
// Version selection variables
:root {
--md-version-icon: svg-load("fontawesome/solid/caret-down.svg");
}
// ----------------------------------------------------------------------------
// Version selection
.md-version {
flex-shrink: 0;
height: px2rem(48px);
font-size: px2rem(16px);
// Current selection
&__current {
position: relative;
// Hack: in general, we would use `vertical-align` to align the version at
// the bottom with the title, but since the list uses absolute positioning,
// this won't work consistently. Furthermore, we would need to use inline
// positioning to align the links, which looks jagged.
top: px2rem(1px);
margin-inline: px2rem(28px) px2rem(8px);
color: inherit;
outline: none;
cursor: pointer;
// Version selection icon
&::after {
display: inline-block;
width: px2rem(8px);
height: px2rem(12px);
margin-inline-start: px2rem(8px);
background-color: currentcolor;
mask-image: var(--md-version-icon);
mask-repeat: no-repeat;
content: "";
}
}
// Version selection list
&__list {
position: absolute;
top: px2rem(3px);
z-index: 3;
max-height: 0;
margin: px2rem(4px) px2rem(16px);
padding: 0;
overflow: auto;
color: var(--md-default-fg-color);
list-style-type: none;
background-color: var(--md-default-bg-color);
border-radius: px2rem(2px);
box-shadow: var(--md-shadow-z2);
opacity: 0;
transition:
max-height 0ms 500ms,
opacity 250ms 250ms;
scroll-snap-type: y mandatory;
// Version selection list on parent focus/hover
.md-version:is(:focus-within, :hover) & {
max-height: px2rem(200px);
opacity: 1;
transition:
max-height 0ms,
opacity 250ms;
}
// Fix hover on touch devices
@media (pointer: coarse) {
// Switch off on hover
.md-version:hover & {
animation: hoverfix 250ms forwards;
}
// Enable on focus
.md-version:focus-within & {
animation: none;
}
}
}
// Version selection item
&__item {
line-height: px2rem(36px);
}
// Version selection link
&__link {
display: block;
width: 100%;
padding-inline: px2rem(12px) px2rem(24px);
white-space: nowrap;
outline: none;
cursor: pointer;
transition:
color 250ms,
background-color 250ms;
scroll-snap-align: start;
// Link on focus/hover
&:is(:focus, :hover) {
color: var(--md-accent-fg-color);
}
// Link on focus
&:focus {
background-color: var(--md-default-fg-color--lightest);
}
}
}
================================================
FILE: mkposters/third_party/stylesheets/main.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Dependencies
// ----------------------------------------------------------------------------
@import "material-color";
@import "material-shadows";
// ----------------------------------------------------------------------------
// Local imports
// ----------------------------------------------------------------------------
@import "utilities/break";
@import "utilities/convert";
@import "config";
@import "main/resets";
@import "main/colors";
@import "main/icons";
@import "main/typeset";
@import "main/layout/banner";
@import "main/layout/base";
@import "main/layout/clipboard";
@import "main/layout/content";
@import "main/layout/dialog";
@import "main/layout/footer";
@import "main/layout/form";
@import "main/layout/header";
@import "main/layout/nav";
@import "main/layout/search";
@import "main/layout/select";
@import "main/layout/sidebar";
@import "main/layout/source";
@import "main/layout/tabs";
@import "main/layout/tag";
@import "main/layout/tooltip";
@import "main/layout/top";
@import "main/layout/version";
@import "main/extensions/markdown/admonition";
@import "main/extensions/markdown/footnotes";
@import "main/extensions/markdown/toc";
@import "main/extensions/pymdownx/arithmatex";
@import "main/extensions/pymdownx/critic";
@import "main/extensions/pymdownx/details";
@import "main/extensions/pymdownx/emoji";
@import "main/extensions/pymdownx/highlight";
@import "main/extensions/pymdownx/keys";
@import "main/extensions/pymdownx/tabbed";
@import "main/extensions/pymdownx/tasklist";
@import "main/integrations/mermaid";
@import "main/modifiers";
================================================
FILE: mkposters/third_party/stylesheets/material-color.scss
================================================
// ==========================================================================
//
// Name: UI Color Palette
// Description: The color palette of material design.
// Version: 2.3.1
//
// Author: Denis Malinochkin
// Git: https://github.com/mrmlnc/material-color
//
// twitter: @mrmlnc
//
// ==========================================================================
//
// List of base colors
//
// $clr-red
// $clr-pink
// $clr-purple
// $clr-deep-purple
// $clr-indigo
// $clr-blue
// $clr-light-blue
// $clr-cyan
// $clr-teal
// $clr-green
// $clr-light-green
// $clr-lime
// $clr-yellow
// $clr-amber
// $clr-orange
// $clr-deep-orange
// $clr-brown
// $clr-grey
// $clr-blue-grey
// $clr-black
// $clr-white
//
// Red
//
$clr-red-list: (
"base": #f44336,
"50": #ffebee,
"100": #ffcdd2,
"200": #ef9a9a,
"300": #e57373,
"400": #ef5350,
"500": #f44336,
"600": #e53935,
"700": #d32f2f,
"800": #c62828,
"900": #b71c1c,
"a100": #ff8a80,
"a200": #ff5252,
"a400": #ff1744,
"a700": #d50000
);
$clr-red: map-get($clr-red-list, "base");
$clr-red-50: map-get($clr-red-list, "50");
$clr-red-100: map-get($clr-red-list, "100");
$clr-red-200: map-get($clr-red-list, "200");
$clr-red-300: map-get($clr-red-list, "300");
$clr-red-400: map-get($clr-red-list, "400");
$clr-red-500: map-get($clr-red-list, "500");
$clr-red-600: map-get($clr-red-list, "600");
$clr-red-700: map-get($clr-red-list, "700");
$clr-red-800: map-get($clr-red-list, "800");
$clr-red-900: map-get($clr-red-list, "900");
$clr-red-a100: map-get($clr-red-list, "a100");
$clr-red-a200: map-get($clr-red-list, "a200");
$clr-red-a400: map-get($clr-red-list, "a400");
$clr-red-a700: map-get($clr-red-list, "a700");
//
// Pink
//
$clr-pink-list: (
"base": #e91e63,
"50": #fce4ec,
"100": #f8bbd0,
"200": #f48fb1,
"300": #f06292,
"400": #ec407a,
"500": #e91e63,
"600": #d81b60,
"700": #c2185b,
"800": #ad1457,
"900": #880e4f,
"a100": #ff80ab,
"a200": #ff4081,
"a400": #f50057,
"a700": #c51162
);
$clr-pink: map-get($clr-pink-list, "base");
$clr-pink-50: map-get($clr-pink-list, "50");
$clr-pink-100: map-get($clr-pink-list, "100");
$clr-pink-200: map-get($clr-pink-list, "200");
$clr-pink-300: map-get($clr-pink-list, "300");
$clr-pink-400: map-get($clr-pink-list, "400");
$clr-pink-500: map-get($clr-pink-list, "500");
$clr-pink-600: map-get($clr-pink-list, "600");
$clr-pink-700: map-get($clr-pink-list, "700");
$clr-pink-800: map-get($clr-pink-list, "800");
$clr-pink-900: map-get($clr-pink-list, "900");
$clr-pink-a100: map-get($clr-pink-list, "a100");
$clr-pink-a200: map-get($clr-pink-list, "a200");
$clr-pink-a400: map-get($clr-pink-list, "a400");
$clr-pink-a700: map-get($clr-pink-list, "a700");
//
// Purple
//
$clr-purple-list: (
"base": #9c27b0,
"50": #f3e5f5,
"100": #e1bee7,
"200": #ce93d8,
"300": #ba68c8,
"400": #ab47bc,
"500": #9c27b0,
"600": #8e24aa,
"700": #7b1fa2,
"800": #6a1b9a,
"900": #4a148c,
"a100": #ea80fc,
"a200": #e040fb,
"a400": #d500f9,
"a700": #aa00ff
);
$clr-purple: map-get($clr-purple-list, "base");
$clr-purple-50: map-get($clr-purple-list, "50");
$clr-purple-100: map-get($clr-purple-list, "100");
$clr-purple-200: map-get($clr-purple-list, "200");
$clr-purple-300: map-get($clr-purple-list, "300");
$clr-purple-400: map-get($clr-purple-list, "400");
$clr-purple-500: map-get($clr-purple-list, "500");
$clr-purple-600: map-get($clr-purple-list, "600");
$clr-purple-700: map-get($clr-purple-list, "700");
$clr-purple-800: map-get($clr-purple-list, "800");
$clr-purple-900: map-get($clr-purple-list, "900");
$clr-purple-a100: map-get($clr-purple-list, "a100");
$clr-purple-a200: map-get($clr-purple-list, "a200");
$clr-purple-a400: map-get($clr-purple-list, "a400");
$clr-purple-a700: map-get($clr-purple-list, "a700");
//
// Deep purple
//
$clr-deep-purple-list: (
"base": #673ab7,
"50": #ede7f6,
"100": #d1c4e9,
"200": #b39ddb,
"300": #9575cd,
"400": #7e57c2,
"500": #673ab7,
"600": #5e35b1,
"700": #512da8,
"800": #4527a0,
"900": #311b92,
"a100": #b388ff,
"a200": #7c4dff,
"a400": #651fff,
"a700": #6200ea
);
$clr-deep-purple: map-get($clr-deep-purple-list, "base");
$clr-deep-purple-50: map-get($clr-deep-purple-list, "50");
$clr-deep-purple-100: map-get($clr-deep-purple-list, "100");
$clr-deep-purple-200: map-get($clr-deep-purple-list, "200");
$clr-deep-purple-300: map-get($clr-deep-purple-list, "300");
$clr-deep-purple-400: map-get($clr-deep-purple-list, "400");
$clr-deep-purple-500: map-get($clr-deep-purple-list, "500");
$clr-deep-purple-600: map-get($clr-deep-purple-list, "600");
$clr-deep-purple-700: map-get($clr-deep-purple-list, "700");
$clr-deep-purple-800: map-get($clr-deep-purple-list, "800");
$clr-deep-purple-900: map-get($clr-deep-purple-list, "900");
$clr-deep-purple-a100: map-get($clr-deep-purple-list, "a100");
$clr-deep-purple-a200: map-get($clr-deep-purple-list, "a200");
$clr-deep-purple-a400: map-get($clr-deep-purple-list, "a400");
$clr-deep-purple-a700: map-get($clr-deep-purple-list, "a700");
//
// Indigo
//
$clr-indigo-list: (
"base": #3f51b5,
"50": #e8eaf6,
"100": #c5cae9,
"200": #9fa8da,
"300": #7986cb,
"400": #5c6bc0,
"500": #3f51b5,
"600": #3949ab,
"700": #303f9f,
"800": #283593,
"900": #1a237e,
"a100": #8c9eff,
"a200": #536dfe,
"a400": #3d5afe,
"a700": #304ffe
);
$clr-indigo: map-get($clr-indigo-list, "base");
$clr-indigo-50: map-get($clr-indigo-list, "50");
$clr-indigo-100: map-get($clr-indigo-list, "100");
$clr-indigo-200: map-get($clr-indigo-list, "200");
$clr-indigo-300: map-get($clr-indigo-list, "300");
$clr-indigo-400: map-get($clr-indigo-list, "400");
$clr-indigo-500: map-get($clr-indigo-list, "500");
$clr-indigo-600: map-get($clr-indigo-list, "600");
$clr-indigo-700: map-get($clr-indigo-list, "700");
$clr-indigo-800: map-get($clr-indigo-list, "800");
$clr-indigo-900: map-get($clr-indigo-list, "900");
$clr-indigo-a100: map-get($clr-indigo-list, "a100");
$clr-indigo-a200: map-get($clr-indigo-list, "a200");
$clr-indigo-a400: map-get($clr-indigo-list, "a400");
$clr-indigo-a700: map-get($clr-indigo-list, "a700");
//
// Blue
//
$clr-blue-list: (
"base": #2196f3,
"50": #e3f2fd,
"100": #bbdefb,
"200": #90caf9,
"300": #64b5f6,
"400": #42a5f5,
"500": #2196f3,
"600": #1e88e5,
"700": #1976d2,
"800": #1565c0,
"900": #0d47a1,
"a100": #82b1ff,
"a200": #448aff,
"a400": #2979ff,
"a700": #2962ff
);
$clr-blue: map-get($clr-blue-list, "base");
$clr-blue-50: map-get($clr-blue-list, "50");
$clr-blue-100: map-get($clr-blue-list, "100");
$clr-blue-200: map-get($clr-blue-list, "200");
$clr-blue-300: map-get($clr-blue-list, "300");
$clr-blue-400: map-get($clr-blue-list, "400");
$clr-blue-500: map-get($clr-blue-list, "500");
$clr-blue-600: map-get($clr-blue-list, "600");
$clr-blue-700: map-get($clr-blue-list, "700");
$clr-blue-800: map-get($clr-blue-list, "800");
$clr-blue-900: map-get($clr-blue-list, "900");
$clr-blue-a100: map-get($clr-blue-list, "a100");
$clr-blue-a200: map-get($clr-blue-list, "a200");
$clr-blue-a400: map-get($clr-blue-list, "a400");
$clr-blue-a700: map-get($clr-blue-list, "a700");
//
// Light Blue
//
$clr-light-blue-list: (
"base": #03a9f4,
"50": #e1f5fe,
"100": #b3e5fc,
"200": #81d4fa,
"300": #4fc3f7,
"400": #29b6f6,
"500": #03a9f4,
"600": #039be5,
"700": #0288d1,
"800": #0277bd,
"900": #01579b,
"a100": #80d8ff,
"a200": #40c4ff,
"a400": #00b0ff,
"a700": #0091ea
);
$clr-light-blue: map-get($clr-light-blue-list, "base");
$clr-light-blue-50: map-get($clr-light-blue-list, "50");
$clr-light-blue-100: map-get($clr-light-blue-list, "100");
$clr-light-blue-200: map-get($clr-light-blue-list, "200");
$clr-light-blue-300: map-get($clr-light-blue-list, "300");
$clr-light-blue-400: map-get($clr-light-blue-list, "400");
$clr-light-blue-500: map-get($clr-light-blue-list, "500");
$clr-light-blue-600: map-get($clr-light-blue-list, "600");
$clr-light-blue-700: map-get($clr-light-blue-list, "700");
$clr-light-blue-800: map-get($clr-light-blue-list, "800");
$clr-light-blue-900: map-get($clr-light-blue-list, "900");
$clr-light-blue-a100: map-get($clr-light-blue-list, "a100");
$clr-light-blue-a200: map-get($clr-light-blue-list, "a200");
$clr-light-blue-a400: map-get($clr-light-blue-list, "a400");
$clr-light-blue-a700: map-get($clr-light-blue-list, "a700");
//
// Cyan
//
$clr-cyan-list: (
"base": #00bcd4,
"50": #e0f7fa,
"100": #b2ebf2,
"200": #80deea,
"300": #4dd0e1,
"400": #26c6da,
"500": #00bcd4,
"600": #00acc1,
"700": #0097a7,
"800": #00838f,
"900": #006064,
"a100": #84ffff,
"a200": #18ffff,
"a400": #00e5ff,
"a700": #00b8d4
);
$clr-cyan: map-get($clr-cyan-list, "base");
$clr-cyan-50: map-get($clr-cyan-list, "50");
$clr-cyan-100: map-get($clr-cyan-list, "100");
$clr-cyan-200: map-get($clr-cyan-list, "200");
$clr-cyan-300: map-get($clr-cyan-list, "300");
$clr-cyan-400: map-get($clr-cyan-list, "400");
$clr-cyan-500: map-get($clr-cyan-list, "500");
$clr-cyan-600: map-get($clr-cyan-list, "600");
$clr-cyan-700: map-get($clr-cyan-list, "700");
$clr-cyan-800: map-get($clr-cyan-list, "800");
$clr-cyan-900: map-get($clr-cyan-list, "900");
$clr-cyan-a100: map-get($clr-cyan-list, "a100");
$clr-cyan-a200: map-get($clr-cyan-list, "a200");
$clr-cyan-a400: map-get($clr-cyan-list, "a400");
$clr-cyan-a700: map-get($clr-cyan-list, "a700");
//
// Teal
//
$clr-teal-list: (
"base": #009688,
"50": #e0f2f1,
"100": #b2dfdb,
"200": #80cbc4,
"300": #4db6ac,
"400": #26a69a,
"500": #009688,
"600": #00897b,
"700": #00796b,
"800": #00695c,
"900": #004d40,
"a100": #a7ffeb,
"a200": #64ffda,
"a400": #1de9b6,
"a700": #00bfa5
);
$clr-teal: map-get($clr-teal-list, "base");
$clr-teal-50: map-get($clr-teal-list, "50");
$clr-teal-100: map-get($clr-teal-list, "100");
$clr-teal-200: map-get($clr-teal-list, "200");
$clr-teal-300: map-get($clr-teal-list, "300");
$clr-teal-400: map-get($clr-teal-list, "400");
$clr-teal-500: map-get($clr-teal-list, "500");
$clr-teal-600: map-get($clr-teal-list, "600");
$clr-teal-700: map-get($clr-teal-list, "700");
$clr-teal-800: map-get($clr-teal-list, "800");
$clr-teal-900: map-get($clr-teal-list, "900");
$clr-teal-a100: map-get($clr-teal-list, "a100");
$clr-teal-a200: map-get($clr-teal-list, "a200");
$clr-teal-a400: map-get($clr-teal-list, "a400");
$clr-teal-a700: map-get($clr-teal-list, "a700");
//
// Green
//
$clr-green-list: (
"base": #4caf50,
"50": #e8f5e9,
"100": #c8e6c9,
"200": #a5d6a7,
"300": #81c784,
"400": #66bb6a,
"500": #4caf50,
"600": #43a047,
"700": #388e3c,
"800": #2e7d32,
"900": #1b5e20,
"a100": #b9f6ca,
"a200": #69f0ae,
"a400": #00e676,
"a700": #00c853
);
$clr-green: map-get($clr-green-list, "base");
$clr-green-50: map-get($clr-green-list, "50");
$clr-green-100: map-get($clr-green-list, "100");
$clr-green-200: map-get($clr-green-list, "200");
$clr-green-300: map-get($clr-green-list, "300");
$clr-green-400: map-get($clr-green-list, "400");
$clr-green-500: map-get($clr-green-list, "500");
$clr-green-600: map-get($clr-green-list, "600");
$clr-green-700: map-get($clr-green-list, "700");
$clr-green-800: map-get($clr-green-list, "800");
$clr-green-900: map-get($clr-green-list, "900");
$clr-green-a100: map-get($clr-green-list, "a100");
$clr-green-a200: map-get($clr-green-list, "a200");
$clr-green-a400: map-get($clr-green-list, "a400");
$clr-green-a700: map-get($clr-green-list, "a700");
//
// Light green
//
$clr-light-green-list: (
"base": #8bc34a,
"50": #f1f8e9,
"100": #dcedc8,
"200": #c5e1a5,
"300": #aed581,
"400": #9ccc65,
"500": #8bc34a,
"600": #7cb342,
"700": #689f38,
"800": #558b2f,
"900": #33691e,
"a100": #ccff90,
"a200": #b2ff59,
"a400": #76ff03,
"a700": #64dd17
);
$clr-light-green: map-get($clr-light-green-list, "base");
$clr-light-green-50: map-get($clr-light-green-list, "50");
$clr-light-green-100: map-get($clr-light-green-list, "100");
$clr-light-green-200: map-get($clr-light-green-list, "200");
$clr-light-green-300: map-get($clr-light-green-list, "300");
$clr-light-green-400: map-get($clr-light-green-list, "400");
$clr-light-green-500: map-get($clr-light-green-list, "500");
$clr-light-green-600: map-get($clr-light-green-list, "600");
$clr-light-green-700: map-get($clr-light-green-list, "700");
$clr-light-green-800: map-get($clr-light-green-list, "800");
$clr-light-green-900: map-get($clr-light-green-list, "900");
$clr-light-green-a100: map-get($clr-light-green-list, "a100");
$clr-light-green-a200: map-get($clr-light-green-list, "a200");
$clr-light-green-a400: map-get($clr-light-green-list, "a400");
$clr-light-green-a700: map-get($clr-light-green-list, "a700");
//
// Lime
//
$clr-lime-list: (
"base": #cddc39,
"50": #f9fbe7,
"100": #f0f4c3,
"200": #e6ee9c,
"300": #dce775,
"400": #d4e157,
"500": #cddc39,
"600": #c0ca33,
"700": #afb42b,
"800": #9e9d24,
"900": #827717,
"a100": #f4ff81,
"a200": #eeff41,
"a400": #c6ff00,
"a700": #aeea00
);
$clr-lime: map-get($clr-lime-list, "base");
$clr-lime-50: map-get($clr-lime-list, "50");
$clr-lime-100: map-get($clr-lime-list, "100");
$clr-lime-200: map-get($clr-lime-list, "200");
$clr-lime-300: map-get($clr-lime-list, "300");
$clr-lime-400: map-get($clr-lime-list, "400");
$clr-lime-500: map-get($clr-lime-list, "500");
$clr-lime-600: map-get($clr-lime-list, "600");
$clr-lime-700: map-get($clr-lime-list, "700");
$clr-lime-800: map-get($clr-lime-list, "800");
$clr-lime-900: map-get($clr-lime-list, "900");
$clr-lime-a100: map-get($clr-lime-list, "a100");
$clr-lime-a200: map-get($clr-lime-list, "a200");
$clr-lime-a400: map-get($clr-lime-list, "a400");
$clr-lime-a700: map-get($clr-lime-list, "a700");
//
// Yellow
//
$clr-yellow-list: (
"base": #ffeb3b,
"50": #fffde7,
"100": #fff9c4,
"200": #fff59d,
"300": #fff176,
"400": #ffee58,
"500": #ffeb3b,
"600": #fdd835,
"700": #fbc02d,
"800": #f9a825,
"900": #f57f17,
"a100": #ffff8d,
"a200": #ffff00,
"a400": #ffea00,
"a700": #ffd600
);
$clr-yellow: map-get($clr-yellow-list, "base");
$clr-yellow-50: map-get($clr-yellow-list, "50");
$clr-yellow-100: map-get($clr-yellow-list, "100");
$clr-yellow-200: map-get($clr-yellow-list, "200");
$clr-yellow-300: map-get($clr-yellow-list, "300");
$clr-yellow-400: map-get($clr-yellow-list, "400");
$clr-yellow-500: map-get($clr-yellow-list, "500");
$clr-yellow-600: map-get($clr-yellow-list, "600");
$clr-yellow-700: map-get($clr-yellow-list, "700");
$clr-yellow-800: map-get($clr-yellow-list, "800");
$clr-yellow-900: map-get($clr-yellow-list, "900");
$clr-yellow-a100: map-get($clr-yellow-list, "a100");
$clr-yellow-a200: map-get($clr-yellow-list, "a200");
$clr-yellow-a400: map-get($clr-yellow-list, "a400");
$clr-yellow-a700: map-get($clr-yellow-list, "a700");
//
// amber
//
$clr-amber-list: (
"base": #ffc107,
"50": #fff8e1,
"100": #ffecb3,
"200": #ffe082,
"300": #ffd54f,
"400": #ffca28,
"500": #ffc107,
"600": #ffb300,
"700": #ffa000,
"800": #ff8f00,
"900": #ff6f00,
"a100": #ffe57f,
"a200": #ffd740,
"a400": #ffc400,
"a700": #ffab00
);
$clr-amber: map-get($clr-amber-list, "base");
$clr-amber-50: map-get($clr-amber-list, "50");
$clr-amber-100: map-get($clr-amber-list, "100");
$clr-amber-200: map-get($clr-amber-list, "200");
$clr-amber-300: map-get($clr-amber-list, "300");
$clr-amber-400: map-get($clr-amber-list, "400");
$clr-amber-500: map-get($clr-amber-list, "500");
$clr-amber-600: map-get($clr-amber-list, "600");
$clr-amber-700: map-get($clr-amber-list, "700");
$clr-amber-800: map-get($clr-amber-list, "800");
$clr-amber-900: map-get($clr-amber-list, "900");
$clr-amber-a100: map-get($clr-amber-list, "a100");
$clr-amber-a200: map-get($clr-amber-list, "a200");
$clr-amber-a400: map-get($clr-amber-list, "a400");
$clr-amber-a700: map-get($clr-amber-list, "a700");
//
// Orange
//
$clr-orange-list: (
"base": #ff9800,
"50": #fff3e0,
"100": #ffe0b2,
"200": #ffcc80,
"300": #ffb74d,
"400": #ffa726,
"500": #ff9800,
"600": #fb8c00,
"700": #f57c00,
"800": #ef6c00,
"900": #e65100,
"a100": #ffd180,
"a200": #ffab40,
"a400": #ff9100,
"a700": #ff6d00
);
$clr-orange: map-get($clr-orange-list, "base");
$clr-orange-50: map-get($clr-orange-list, "50");
$clr-orange-100: map-get($clr-orange-list, "100");
$clr-orange-200: map-get($clr-orange-list, "200");
$clr-orange-300: map-get($clr-orange-list, "300");
$clr-orange-400: map-get($clr-orange-list, "400");
$clr-orange-500: map-get($clr-orange-list, "500");
$clr-orange-600: map-get($clr-orange-list, "600");
$clr-orange-700: map-get($clr-orange-list, "700");
$clr-orange-800: map-get($clr-orange-list, "800");
$clr-orange-900: map-get($clr-orange-list, "900");
$clr-orange-a100: map-get($clr-orange-list, "a100");
$clr-orange-a200: map-get($clr-orange-list, "a200");
$clr-orange-a400: map-get($clr-orange-list, "a400");
$clr-orange-a700: map-get($clr-orange-list, "a700");
//
// Deep orange
//
$clr-deep-orange-list: (
"base": #ff5722,
"50": #fbe9e7,
"100": #ffccbc,
"200": #ffab91,
"300": #ff8a65,
"400": #ff7043,
"500": #ff5722,
"600": #f4511e,
"700": #e64a19,
"800": #d84315,
"900": #bf360c,
"a100": #ff9e80,
"a200": #ff6e40,
"a400": #ff3d00,
"a700": #dd2c00
);
$clr-deep-orange: map-get($clr-deep-orange-list, "base");
$clr-deep-orange-50: map-get($clr-deep-orange-list, "50");
$clr-deep-orange-100: map-get($clr-deep-orange-list, "100");
$clr-deep-orange-200: map-get($clr-deep-orange-list, "200");
$clr-deep-orange-300: map-get($clr-deep-orange-list, "300");
$clr-deep-orange-400: map-get($clr-deep-orange-list, "400");
$clr-deep-orange-500: map-get($clr-deep-orange-list, "500");
$clr-deep-orange-600: map-get($clr-deep-orange-list, "600");
$clr-deep-orange-700: map-get($clr-deep-orange-list, "700");
$clr-deep-orange-800: map-get($clr-deep-orange-list, "800");
$clr-deep-orange-900: map-get($clr-deep-orange-list, "900");
$clr-deep-orange-a100: map-get($clr-deep-orange-list, "a100");
$clr-deep-orange-a200: map-get($clr-deep-orange-list, "a200");
$clr-deep-orange-a400: map-get($clr-deep-orange-list, "a400");
$clr-deep-orange-a700: map-get($clr-deep-orange-list, "a700");
//
// Brown
//
$clr-brown-list: (
"base": #795548,
"50": #efebe9,
"100": #d7ccc8,
"200": #bcaaa4,
"300": #a1887f,
"400": #8d6e63,
"500": #795548,
"600": #6d4c41,
"700": #5d4037,
"800": #4e342e,
"900": #3e2723,
);
$clr-brown: map-get($clr-brown-list, "base");
$clr-brown-50: map-get($clr-brown-list, "50");
$clr-brown-100: map-get($clr-brown-list, "100");
$clr-brown-200: map-get($clr-brown-list, "200");
$clr-brown-300: map-get($clr-brown-list, "300");
$clr-brown-400: map-get($clr-brown-list, "400");
$clr-brown-500: map-get($clr-brown-list, "500");
$clr-brown-600: map-get($clr-brown-list, "600");
$clr-brown-700: map-get($clr-brown-list, "700");
$clr-brown-800: map-get($clr-brown-list, "800");
$clr-brown-900: map-get($clr-brown-list, "900");
//
// Grey
//
$clr-grey-list: (
"base": #9e9e9e,
"50": #fafafa,
"100": #f5f5f5,
"200": #eeeeee,
"300": #e0e0e0,
"400": #bdbdbd,
"500": #9e9e9e,
"600": #757575,
"700": #616161,
"800": #424242,
"900": #212121,
);
$clr-grey: map-get($clr-grey-list, "base");
$clr-grey-50: map-get($clr-grey-list, "50");
$clr-grey-100: map-get($clr-grey-list, "100");
$clr-grey-200: map-get($clr-grey-list, "200");
$clr-grey-300: map-get($clr-grey-list, "300");
$clr-grey-400: map-get($clr-grey-list, "400");
$clr-grey-500: map-get($clr-grey-list, "500");
$clr-grey-600: map-get($clr-grey-list, "600");
$clr-grey-700: map-get($clr-grey-list, "700");
$clr-grey-800: map-get($clr-grey-list, "800");
$clr-grey-900: map-get($clr-grey-list, "900");
//
// Blue grey
//
$clr-blue-grey-list: (
"base": #607d8b,
"50": #eceff1,
"100": #cfd8dc,
"200": #b0bec5,
"300": #90a4ae,
"400": #78909c,
"500": #607d8b,
"600": #546e7a,
"700": #455a64,
"800": #37474f,
"900": #263238,
);
$clr-blue-grey: map-get($clr-blue-grey-list, "base");
$clr-blue-grey-50: map-get($clr-blue-grey-list, "50");
$clr-blue-grey-100: map-get($clr-blue-grey-list, "100");
$clr-blue-grey-200: map-get($clr-blue-grey-list, "200");
$clr-blue-grey-300: map-get($clr-blue-grey-list, "300");
$clr-blue-grey-400: map-get($clr-blue-grey-list, "400");
$clr-blue-grey-500: map-get($clr-blue-grey-list, "500");
$clr-blue-grey-600: map-get($clr-blue-grey-list, "600");
$clr-blue-grey-700: map-get($clr-blue-grey-list, "700");
$clr-blue-grey-800: map-get($clr-blue-grey-list, "800");
$clr-blue-grey-900: map-get($clr-blue-grey-list, "900");
//
// Black
//
$clr-black-list: (
"base": #000
);
$clr-black: map-get($clr-black-list, "base");
//
// White
//
$clr-white-list: (
"base": #fff
);
$clr-white: map-get($clr-white-list, "base");
//
// List for all Colors for looping
//
$clr-list-all: (
"red": $clr-red-list,
"pink": $clr-pink-list,
"purple": $clr-purple-list,
"deep-purple": $clr-deep-purple-list,
"indigo": $clr-indigo-list,
"blue": $clr-blue-list,
"light-blue": $clr-light-blue-list,
"cyan": $clr-cyan-list,
"teal": $clr-teal-list,
"green": $clr-green-list,
"light-green": $clr-light-green-list,
"lime": $clr-lime-list,
"yellow": $clr-yellow-list,
"amber": $clr-amber-list,
"orange": $clr-orange-list,
"deep-orange": $clr-deep-orange-list,
"brown": $clr-brown-list,
"grey": $clr-grey-list,
"blue-grey": $clr-blue-grey-list,
"black": $clr-black-list,
"white": $clr-white-list
);
//
// Typography
//
$clr-ui-display-4: $clr-grey-600;
$clr-ui-display-3: $clr-grey-600;
$clr-ui-display-2: $clr-grey-600;
$clr-ui-display-1: $clr-grey-600;
$clr-ui-headline: $clr-grey-900;
$clr-ui-title: $clr-grey-900;
$clr-ui-subhead-1: $clr-grey-900;
$clr-ui-body-2: $clr-grey-900;
$clr-ui-body-1: $clr-grey-900;
$clr-ui-caption: $clr-grey-600;
$clr-ui-menu: $clr-grey-900;
$clr-ui-button: $clr-grey-900;
================================================
FILE: mkposters/third_party/stylesheets/material-shadows.scss
================================================
//
// Name: Material Shadows
// Description: Mixins for Material Design Shadows.
// Version: 3.0.1
//
// Author: Denis Malinochkin
// Git: https://github.com/mrmlnc/material-shadows
//
// twitter: @mrmlnc
//
// ------------------------------------
// Mixins
// ------------------------------------
@mixin z-depth-transition() {
transition: box-shadow .28s cubic-bezier(.4, 0, .2, 1);
}
@mixin z-depth-focus() {
box-shadow: 0 0 8px rgba(0, 0, 0, .18), 0 8px 16px rgba(0, 0, 0, .36);
}
@mixin z-depth-2dp() {
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14),
0 1px 5px 0 rgba(0, 0, 0, .12),
0 3px 1px -2px rgba(0, 0, 0, .2);
}
@mixin z-depth-3dp() {
box-shadow: 0 3px 4px 0 rgba(0, 0, 0, .14),
0 1px 8px 0 rgba(0, 0, 0, .12),
0 3px 3px -2px rgba(0, 0, 0, .4);
}
@mixin z-depth-4dp() {
box-shadow: 0 4px 5px 0 rgba(0, 0, 0, .14),
0 1px 10px 0 rgba(0, 0, 0, .12),
0 2px 4px -1px rgba(0, 0, 0, .4);
}
@mixin z-depth-6dp() {
box-shadow: 0 6px 10px 0 rgba(0, 0, 0, .14),
0 1px 18px 0 rgba(0, 0, 0, .12),
0 3px 5px -1px rgba(0, 0, 0, .4);
}
@mixin z-depth-8dp() {
box-shadow: 0 8px 10px 1px rgba(0, 0, 0, .14),
0 3px 14px 2px rgba(0, 0, 0, .12),
0 5px 5px -3px rgba(0, 0, 0, .4);
}
@mixin z-depth-16dp() {
box-shadow: 0 16px 24px 2px rgba(0, 0, 0, .14),
0 6px 30px 5px rgba(0, 0, 0, .12),
0 8px 10px -5px rgba(0, 0, 0, .4);
}
@mixin z-depth-24dp() {
box-shadow: 0 9px 46px 8px rgba(0, 0, 0, .14),
0 24px 38px 3px rgba(0, 0, 0, .12),
0 11px 15px -7px rgba(0, 0, 0, .4);
}
@mixin z-depth($dp: 2) {
@if $dp == 2 {
@include z-depth-2dp();
} @else if $dp == 3 {
@include z-depth-3dp();
} @else if $dp == 4 {
@include z-depth-4dp();
} @else if $dp == 6 {
@include z-depth-6dp();
} @else if $dp == 8 {
@include z-depth-8dp();
} @else if $dp == 16 {
@include z-depth-16dp();
} @else if $dp == 24 {
@include z-depth-24dp();
}
}
// Class generator
// ------------------------------------
@mixin z-depth-classes($transition: false, $focus: false) {
@if $transition == true {
&-transition {
@include z-depth-transition();
}
}
@if $focus == true {
&-focus {
@include z-depth-focus();
}
}
// The available values for the shadow depth
@each $depth in 2, 3, 4, 6, 8, 16, 24 {
&-#{$depth}dp {
@include z-depth($depth);
}
}
}
================================================
FILE: mkposters/third_party/stylesheets/palette/_accent.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Rules
// ----------------------------------------------------------------------------
@each $name, $color in (
"red": $clr-red-a400,
"pink": $clr-pink-a400,
"purple": $clr-purple-a200,
"deep-purple": $clr-deep-purple-a200,
"indigo": $clr-indigo-a200,
"blue": $clr-blue-a200,
"light-blue": $clr-light-blue-a700,
"cyan": $clr-cyan-a700,
"teal": $clr-teal-a700,
"green": $clr-green-a700,
"light-green": $clr-light-green-a700,
"lime": $clr-lime-a700,
"yellow": $clr-yellow-a700,
"amber": $clr-amber-a700,
"orange": $clr-orange-a400,
"deep-orange": $clr-deep-orange-a200
) {
// Color palette
[data-md-color-accent="#{$name}"] {
--md-accent-fg-color: hsla(#{hex2hsl($color)}, 1);
--md-accent-fg-color--transparent: hsla(#{hex2hsl($color)}, 0.1);
// Inverted text for lighter shades
@if index("lime" "yellow" "amber" "orange", $name) {
--md-accent-bg-color: hsla(0, 0%, 0%, 0.87);
--md-accent-bg-color--light: hsla(0, 0%, 0%, 0.54);
} @else {
--md-accent-bg-color: hsla(0, 0%, 100%, 1);
--md-accent-bg-color--light: hsla(0, 0%, 100%, 0.7);
}
}
}
================================================
FILE: mkposters/third_party/stylesheets/palette/_primary.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
@use "sass:list";
// ----------------------------------------------------------------------------
// Rules
// ----------------------------------------------------------------------------
@each $name, $colors in (
"red": $clr-red-400 $clr-red-300 $clr-red-600,
"pink": $clr-pink-500 $clr-pink-400 $clr-pink-700,
"purple": $clr-purple-400 $clr-purple-300 $clr-purple-600,
"deep-purple": $clr-deep-purple-400 $clr-deep-purple-300 $clr-deep-purple-500,
"indigo": $clr-indigo-500 $clr-indigo-400 $clr-indigo-700,
"blue": $clr-blue-500 $clr-blue-400 $clr-blue-700,
"light-blue": $clr-light-blue-500 $clr-light-blue-400 $clr-light-blue-700,
"cyan": $clr-cyan-500 $clr-cyan-400 $clr-cyan-700,
"teal": $clr-teal-500 $clr-teal-400 $clr-teal-700,
"green": $clr-green-500 $clr-green-400 $clr-green-700,
"light-green": $clr-light-green-500 $clr-light-green-400 $clr-light-green-700,
"lime": $clr-lime-500 $clr-lime-400 $clr-lime-700,
"yellow": $clr-yellow-500 $clr-yellow-400 $clr-yellow-700,
"amber": $clr-amber-500 $clr-amber-400 $clr-amber-700,
"orange": $clr-orange-400 $clr-orange-400 $clr-orange-600,
"deep-orange": $clr-deep-orange-400 $clr-deep-orange-300 $clr-deep-orange-600,
"brown": $clr-brown-500 $clr-brown-400 $clr-brown-700,
"grey": $clr-grey-600 $clr-grey-500 $clr-grey-700,
"blue-grey": $clr-blue-grey-600 $clr-blue-grey-500 $clr-blue-grey-700
) {
// Color palette
[data-md-color-primary="#{$name}"] {
--md-primary-fg-color: hsl(#{hex2hsl(list.nth($colors, 1))});
--md-primary-fg-color--light: hsl(#{hex2hsl(list.nth($colors, 2))});
--md-primary-fg-color--dark: hsl(#{hex2hsl(list.nth($colors, 3))});
// Inverted text for lighter shades
@if index("lime" "yellow" "amber" "orange", $name) {
--md-primary-bg-color: hsla(0, 0%, 0%, 0.87);
--md-primary-bg-color--light: hsla(0, 0%, 0%, 0.54);
} @else {
--md-primary-bg-color: hsla(0, 0%, 100%, 1);
--md-primary-bg-color--light: hsla(0, 0%, 100%, 0.7);
}
}
}
// ----------------------------------------------------------------------------
// Rules: white
// ----------------------------------------------------------------------------
// Color palette
[data-md-color-primary="white"] {
--md-primary-fg-color: hsla(0, 0%, 100%, 1);
--md-primary-fg-color--light: hsla(0, 0%, 100%, 0.7);
--md-primary-fg-color--dark: hsla(0, 0%, 0%, 0.07);
--md-primary-bg-color: hsla(0, 0%, 0%, 0.87);
--md-primary-bg-color--light: hsla(0, 0%, 0%, 0.54);
// Typeset color shades
--md-typeset-a-color: hsla(#{hex2hsl($clr-indigo-500)}, 1);
// [tablet portrait +]: Header-embedded search
@include break-from-device(tablet landscape) {
// Search form
.md-search__form {
background-color: hsla(0, 0%, 0%, 0.07);
// Search form on hover
&:hover {
background-color: hsla(0, 0%, 0%, 0.32);
}
}
// Search icon
.md-search__input + .md-search__icon {
color: hsla(0, 0%, 0%, 0.87);
}
}
// [screen +]: Add bottom border for tabs
@include break-from-device(screen) {
// Navigation tabs
.md-tabs {
border-bottom: px2rem(1px) solid hsla(0, 0%, 0%, 0.07);
}
}
}
// ----------------------------------------------------------------------------
// Rules: black
// ----------------------------------------------------------------------------
// Color palette
[data-md-color-primary="black"] {
--md-primary-fg-color: hsla(0, 0%, 0%, 1);
--md-primary-fg-color--light: hsla(0, 0%, 0%, 0.54);
--md-primary-fg-color--dark: hsla(0, 0%, 0%, 1);
--md-primary-bg-color: hsla(0, 0%, 100%, 1);
--md-primary-bg-color--light: hsla(0, 0%, 100%, 0.7);
// Text color shades
--md-typeset-a-color: hsla(#{hex2hsl($clr-indigo-500)}, 1);
// Header
.md-header {
background-color: hsla(0, 0%, 0%, 1);
}
// [tablet portrait -]: Layered navigation
@include break-to-device(tablet portrait) {
// Repository information container
.md-nav__source {
background-color: hsla(0, 0%, 0%, 0.87);
}
}
// [tablet landscape +]: Header-embedded search
@include break-from-device(tablet landscape) {
// Search form
.md-search__form {
background-color: hsla(0, 0%, 100%, 0.12);
// Search form on hover
&:hover {
background-color: hsla(0, 0%, 100%, 0.3);
}
}
}
// [tablet -]: Layered navigation
@include break-to-device(tablet) {
// Site title in main navigation
html & .md-nav--primary .md-nav__title[for="__drawer"] {
background-color: hsla(0, 0%, 0%, 1);
}
}
// [screen +]: Set background color for tabs
@include break-from-device(screen) {
// Navigation tabs
.md-tabs {
background-color: hsla(0, 0%, 0%, 1);
}
}
}
================================================
FILE: mkposters/third_party/stylesheets/palette/_scheme.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Rules
// ----------------------------------------------------------------------------
// Only use dark mode on screens
@media screen {
// Slate theme, i.e. dark mode
[data-md-color-scheme="slate"] {
// Slate's hue in the range [0,360] - change this variable to alter the tone
// of the theme, e.g. to make it more redish or greenish. This is a slate-
// specific variable, but the same approach may be adapted to custom themes.
--md-hue: 232;
// Default color shades
--md-default-fg-color: hsla(var(--md-hue), 75%, 95%, 1);
--md-default-fg-color--light: hsla(var(--md-hue), 75%, 90%, 0.62);
--md-default-fg-color--lighter: hsla(var(--md-hue), 75%, 90%, 0.32);
--md-default-fg-color--lightest: hsla(var(--md-hue), 75%, 90%, 0.12);
--md-default-bg-color: hsla(var(--md-hue), 15%, 21%, 1);
--md-default-bg-color--light: hsla(var(--md-hue), 15%, 21%, 0.54);
--md-default-bg-color--lighter: hsla(var(--md-hue), 15%, 21%, 0.26);
--md-default-bg-color--lightest: hsla(var(--md-hue), 15%, 21%, 0.07);
// Code color shades
--md-code-fg-color: hsla(var(--md-hue), 18%, 86%, 1);
--md-code-bg-color: hsla(var(--md-hue), 15%, 15%, 1);
// Code highlighting color shades
--md-code-hl-color: hsla(#{hex2hsl($clr-blue-a200)}, 0.15);
--md-code-hl-number-color: hsla(6, 74%, 63%, 1);
--md-code-hl-special-color: hsla(340, 83%, 66%, 1);
--md-code-hl-function-color: hsla(291, 57%, 65%, 1);
--md-code-hl-constant-color: hsla(250, 62%, 70%, 1);
--md-code-hl-keyword-color: hsla(219, 66%, 64%, 1);
--md-code-hl-string-color: hsla(150, 58%, 44%, 1);
--md-code-hl-name-color: var(--md-code-fg-color);
--md-code-hl-operator-color: var(--md-default-fg-color--light);
--md-code-hl-punctuation-color: var(--md-default-fg-color--light);
--md-code-hl-comment-color: var(--md-default-fg-color--light);
--md-code-hl-generic-color: var(--md-default-fg-color--light);
--md-code-hl-variable-color: var(--md-default-fg-color--light);
// Typeset color shades
--md-typeset-color: var(--md-default-fg-color);
// Typeset `a` color shades
--md-typeset-a-color: var(--md-primary-fg-color);
// Typeset `mark` color shades
--md-typeset-mark-color: hsla(#{hex2hsl($clr-blue-a200)}, 0.3);
// Typeset `kbd` color shades
--md-typeset-kbd-color: hsla(var(--md-hue), 15%, 94%, 0.12);
--md-typeset-kbd-accent-color: hsla(var(--md-hue), 15%, 94%, 0.2);
--md-typeset-kbd-border-color: hsla(var(--md-hue), 15%, 14%, 1);
// Typeset `table` color shades
--md-typeset-table-color: hsla(var(--md-hue), 75%, 95%, 0.12);
// Admonition color shades
--md-admonition-bg-color: hsla(var(--md-hue), 0%, 100%, 0.025);
// Footer color shades
--md-footer-bg-color: hsla(var(--md-hue), 15%, 12%, 0.87);
--md-footer-bg-color--dark: hsla(var(--md-hue), 15%, 10%, 1);
// Black and white primary colors
&[data-md-color-primary="black"],
&[data-md-color-primary="white"] {
// Typeset color shades
--md-typeset-a-color: hsla(#{hex2hsl($clr-indigo-400)}, 1);
}
// Hide images for light mode
img[src$="#only-light"] {
display: none;
}
// Show images for dark mode
img[src$="#only-dark"] {
display: initial;
}
}
}
================================================
FILE: mkposters/third_party/stylesheets/palette.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Dependencies
// ----------------------------------------------------------------------------
@import "material-color";
// ----------------------------------------------------------------------------
// Local imports
// ----------------------------------------------------------------------------
@import "utilities/break";
@import "utilities/convert";
@import "config";
@import "palette/accent";
@import "palette/primary";
@import "palette/scheme";
================================================
FILE: mkposters/third_party/stylesheets/utilities/_break.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
@use "sass:list";
@use "sass:map";
@use "sass:math";
// ----------------------------------------------------------------------------
// Variables
// ----------------------------------------------------------------------------
///
/// Device-specific breakpoints
///
/// @example
/// $break-devices: (
/// mobile: (
/// portrait: 220px 479px,
/// landscape: 480px 719px
/// ),
/// tablet: (
/// portrait: 720px 959px,
/// landscape: 960px 1219px
/// ),
/// screen: (
/// small: 1220px 1599px,
/// medium: 1600px 1999px,
/// large: 2000px
/// )
/// );
///
$break-devices: () !default;
// ----------------------------------------------------------------------------
// Helpers
// ----------------------------------------------------------------------------
///
/// Choose minimum and maximum device widths
///
@function break-select-min-max($devices) {
$min: 1000000;
$max: 0;
@each $key, $value in $devices {
@while type-of($value) == map {
$value: break-select-min-max($value);
}
@if type-of($value) == list {
@each $number in $value {
@if type-of($number) == number {
$min: math.min($number, $min);
@if $max {
$max: math.max($number, $max);
}
} @else {
@error "Invalid number: #{$number}";
}
}
} @else if type-of($value) == number {
$min: math.min($value, $min);
$max: null;
} @else {
@error "Invalid value: #{$value}";
}
}
@return $min, $max;
}
///
/// Select minimum and maximum widths for a device breakpoint
///
@function break-select-device($device) {
$current: $break-devices;
@for $n from 1 through length($device) {
@if type-of($current) == map {
$current: map.get($current, list.nth($device, $n));
} @else {
@error "Invalid device map: #{$devices}";
}
}
@if type-of($current) == list or type-of($current) == number {
$current: (default: $current);
}
@return break-select-min-max($current);
}
// ----------------------------------------------------------------------------
// Mixins
// ----------------------------------------------------------------------------
///
/// A minimum-maximum media query breakpoint
///
@mixin break-at($breakpoint) {
@if type-of($breakpoint) == number {
@media screen and (min-width: $breakpoint) {
@content;
}
} @else if type-of($breakpoint) == list {
$min: list.nth($breakpoint, 1);
$max: list.nth($breakpoint, 2);
@if type-of($min) == number and type-of($max) == number {
@media screen and (min-width: $min) and (max-width: $max) {
@content;
}
} @else {
@error "Invalid breakpoint: #{$breakpoint}";
}
} @else {
@error "Invalid breakpoint: #{$breakpoint}";
}
}
///
/// An orientation media query breakpoint
///
@mixin break-at-orientation($breakpoint) {
@if type-of($breakpoint) == string {
@media screen and (orientation: $breakpoint) {
@content;
}
} @else {
@error "Invalid breakpoint: #{$breakpoint}";
}
}
///
/// A maximum-aspect-ratio media query breakpoint
///
@mixin break-at-ratio($breakpoint) {
@if type-of($breakpoint) == number {
@media screen and (max-aspect-ratio: $breakpoint) {
@content;
}
} @else {
@error "Invalid breakpoint: #{$breakpoint}";
}
}
///
/// A minimum-maximum media query device breakpoint
///
@mixin break-at-device($device) {
@if type-of($device) == string {
$device: $device,;
}
@if type-of($device) == list {
$breakpoint: break-select-device($device);
@if list.nth($breakpoint, 2) {
$min: list.nth($breakpoint, 1);
$max: list.nth($breakpoint, 2);
@media screen and (min-width: $min) and (max-width: $max) {
@content;
}
} @else {
@error "Invalid device: #{$device}";
}
} @else {
@error "Invalid device: #{$device}";
}
}
///
/// A minimum media query device breakpoint
///
@mixin break-from-device($device) {
@if type-of($device) == string {
$device: $device,;
}
@if type-of($device) == list {
$breakpoint: break-select-device($device);
$min: list.nth($breakpoint, 1);
@media screen and (min-width: $min) {
@content;
}
} @else {
@error "Invalid device: #{$device}";
}
}
///
/// A maximum media query device breakpoint
///
@mixin break-to-device($device) {
@if type-of($device) == string {
$device: $device,;
}
@if type-of($device) == list {
$breakpoint: break-select-device($device);
$max: list.nth($breakpoint, 2);
@media screen and (max-width: $max) {
@content;
}
} @else {
@error "Invalid device: #{$device}";
}
}
================================================
FILE: mkposters/third_party/stylesheets/utilities/_convert.scss
================================================
////
/// Copyright (c) 2016-2022 Martin Donath
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
@use "sass:math";
// ----------------------------------------------------------------------------
// Helpers
// ----------------------------------------------------------------------------
///
/// Strip units from a number
///
@function strip-units($number) {
@return math.div($number, ($number * 0 + 1));
}
///
/// Convert color in HEX to HSL
///
/// Note, that we need to strip the `deg` units from the `hue` value, as they
/// were added in Color Level 4, which not all browsers support.
///
@function hex2hsl($color) {
@return
round(strip-units(hue($color))),
round(saturation($color)),
round(lightness($color));
}
// ----------------------------------------------------------------------------
///
/// Convert font size in px to em
///
@function px2em($size, $base: 16px) {
@if unit($size) == px {
@if unit($base) == px {
@return math.div($size, $base) * 1em;
} @else {
@error "Invalid base: #{$base} - unit must be 'px'";
}
} @else {
@error "Invalid size: #{$size} - unit must be 'px'";
}
}
///
/// Convert font size in px to rem
///
@function px2rem($size, $base: 20px) {
@if unit($size) == px {
@if unit($base) == px {
@return math.div($size, $base) * 1rem;
} @else {
@error "Invalid base: #{$base} - unit must be 'px'";
}
} @else {
@error "Invalid size: #{$size} - unit must be 'px'";
}
}
================================================
FILE: pyproject.toml
================================================
[project]
name = "mkposters"
version = "0.0.4"
description = "Make posters from Markdown files."
readme = "README.md"
requires-python ="~=3.8"
license = {file = "LICENSE"}
authors = [
{name = "Patrick Kidger", email = "contact@kidger.site"},
]
keywords = ["theme", "markdown", "template", "material-design", "poster", "mkdocs"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
]
urls = {repository = "https://github.com/patrick-kidger/mkposters"}
dependencies = ["markdown>=3.3.6", "pymdown-extensions>=9.1"]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build]
include = ["mkposters/*"]
exclude = ["mkposters/third_party/dart-sass/*"]
[tool.ruff]
select = ["E", "F", "I001"]
ignore = ["E402", "E721", "E731", "E741", "F722"]
ignore-init-module-imports = true
[tool.ruff.isort]
combine-as-imports = true
lines-after-imports = 2
extra-standard-library = ["typing_extensions"]
order-by-type = false
================================================
FILE: tests/requirements.txt
================================================
pytest
================================================
FILE: tests/test_example.py
================================================
import pathlib
import mkposters
_here = pathlib.Path(__file__).resolve().parent
def test_example():
diffrax_example = _here.parent / "examples" / "diffrax"
mkposters.mkposter(diffrax_example, timeout_s=1)