Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

Commit 3bb8686

Browse files
committed
Updated theming documentation
1 parent 0420551 commit 3bb8686

File tree

1 file changed

+68
-1
lines changed

1 file changed

+68
-1
lines changed

docs/guide/theming.md

+68-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,74 @@
11
The components are unstyled by default, so you can customize them with your own styles. If you want a more "ready to go" solution you can import one of the themes we have included in `src/styles/themes/`
22

33
```scss
4-
@import '~@asigloo/vue-dynamic-forms/src/styles/themes/default.scss';
4+
@import '~@asigloo/vue-dynamic-forms/src/styles/themes/theme.scss';
55
```
66

77
For now, only default theme (similar to bootstrap) is available. More themes are in progress.
8+
9+
10+
## Defaul Theme
11+
12+
Similar to default bootstrap theme for forms.
13+
14+
### Import to your app
15+
16+
```scss
17+
@import '~@asigloo/vue-dynamic-forms/src/styles/themes/theme.scss';
18+
```
19+
20+
### Customize your variables
21+
22+
```scss
23+
$input-bg: #e2eb5d52;
24+
$input-border-color: #aec64c;
25+
26+
@import '~@asigloo/vue-dynamic-forms/src/styles/themes/theme.scss';
27+
```
28+
29+
### Variables available
30+
31+
You have all this variables to customize your form inputs.
32+
33+
Consider that this variables will affect **All** your inputs, for more selective styling please use `customClass` available on the [models](./models.md).
34+
35+
```scss
36+
$font-family-sans-serif: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
37+
'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji',
38+
'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji' !default;
39+
40+
$input-line-height: 1.5 !default;
41+
$input-font-family: $font-family-sans-serif !default;
42+
$input-font-size: 1rem !default;
43+
$input-font-weight: 400;
44+
45+
$input-padding-y: 0.375rem !default;
46+
$input-padding-x: 0.75rem !default;
47+
$input-border-width: 1px !default;
48+
$input-border-color: #e9ecef !default;
49+
$input-bg: #fff !default;
50+
$input-disabled-bg: #e9ecef;
51+
$input-border-radius: 0.25rem !default;
52+
53+
$input-transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !default;
54+
$input-placeholder-color: #6c757d !default;
55+
$input-box-shadow: inset 0 1px 1px rgba(#000, 0.075) !default;
56+
$input-height: calc(
57+
#{$input-line-height * 1em} + #{$input-padding-y * 2} + #{$input-border-width *
58+
2}
59+
);
60+
61+
$input-focus-bg: $input-bg !default;
62+
$input-focus-border-color: lighten($component-active-bg, 25%) !default;
63+
$input-focus-color: $input-color !default;
64+
$input-focus-width: $input-btn-focus-width !default;
65+
$input-focus-box-shadow: $input-btn-focus-box-shadow !default;
66+
67+
$enable-shadows: true !default;
68+
69+
$input-error-color: #dc3545 !default;
70+
```
71+
72+
## Material Theme
73+
74+
Work in progress [[#3](https://github.com/alvarosaburido/vue-dynamic-forms/issues/3)]

0 commit comments

Comments
 (0)