Skip to content

Commit 3624822

Browse files
committed
docs(theming): add docs about how to theme Lime Elements
1 parent a69009e commit 3624822

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

guides.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Guide } from 'kompendium';
33
export default [
44
{
55
name: 'Home',
6-
children: ['src/contributing.md', 'src/events.md'],
6+
children: ['src/contributing.md', 'src/events.md', 'src/theming.md'],
77
},
88
{
99
name: 'DesignGuidelines',

src/theming.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Theming
2+
3+
Lime Elements is relatively restrictive about the look and feel of the components. For instance, consumers cannot apply custom spaces around internal elements, change border radiuses, or size of the visual details.
4+
5+
However, you still have lots of theming possibilities, such as setting your desired font, controlling colors on component level, and setting a global accent color.
6+
7+
## Setting desired font family
8+
9+
To achieve a blazing fast rendering, our components' user interface utilizes a default cross-browser sans-serif font stack.
10+
11+
Lime Element is by default font agnostic, and basically relies on the inbuilt font of user's device. So there is no need for the users to download any fonts, while loading Lime Elements on their device.
12+
13+
This also means that the UI would look slightly different on iOS, Android, Windows, Linux, etc… as they all have their own default system UI font.
14+
15+
However, you can easily set your own desired font family. As web components typically inherit font-related styles such as `font-family`, `font-size`, and `color`, we recommend defining these styles at a higher level, such as the `<body>` element.
16+
17+
If you use other libraries in combination with Lime Elements in your project, to maintain consistency with the look & feel demonstrated in this documentation, we suggest incorporating the following styles into your project:
18+
19+
```css
20+
font-family: ui-sans-serif, system-ui, sans-serif;
21+
font-size: 0.875rem;
22+
font-style: normal;
23+
font-weight: 400;
24+
color: rgb(var(--contrast-1500));
25+
```
26+
27+
💡 About the `color` specified above, read more on [our color system](/#/DesignGuidelines/color-system.md/).
28+
29+
Or if you want to customize the font-family and related styles to suit your project's needs, you might prefer a different typeface like below:
30+
31+
```css
32+
font-family: 'Roboto', Arial, Verdana, sans-serif;
33+
```

0 commit comments

Comments
 (0)