Contribute
The documentation on this site is created and edited by a variety of contributors. If you would like to contribute to the documentation, please follow the steps below.
-
Learn about using Markdown basic syntax.
-
Create or edit any
.md(or.mdx) files insrc/content/docs/directory. All files within are mapped to a filename based URL structure.Eg. the content at
src/content/docs/start/contribute.mdxis available at/start/contributeas you can see in the current URL.Any documentation nested within directories will be automatically included in the sidebar navigation. For advanced use-cases you can configure
sidebarinastro.config.js. -
Additional reading for more advanced content.
CSS Layers
Section titled “CSS Layers”The styleguide is structured using CSS layers to ensure proper loading order and to avoid conflicts with both legacy and otherwise globally available styles. The layers are organized as follows:
legacy— “legacy” current design stylestngtng.resettng.coretng.layoutstng.componentstng.userstylestng.utilities
Components
Section titled “Components”Many components are one-on-one with an HTML element.
One Root
Section titled “One Root”Each component should target one tng-* class.
.tng-tag { /* All styles go in here */}Nested elements
Section titled “Nested elements”When your component contains additionally nested elements (with or without classes) you can target then using CSS nesting.
.tng-alert { header, .header { /* header styles */ }}Nested components
Section titled “Nested components”Often the components will be used in a composition. You can target nested components the same way by using CSS nesting.
<div class="tng-badge"> Toyota <i class="tng-icon close"></i></div>.tng-badge { --tng-badge-border-color: var(--tng-color-border-neutral-default);
.tng-icon { color: var(--tng-badge-border-color); }}- Internal variables
is-…at-…
Utilities
Section titled “Utilities”Most of our utilities are built to be used specifically with our styleguide layout and components. Using them on random elements will and should not do anything.
.gap-none { --tng-gap: var(--tng-spacing-none);}All components should clearly document which utilities they support.