Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

Commit 0bd3c83

Browse files
doc: CSS4 variables
1 parent defa8ff commit 0bd3c83

File tree

3 files changed

+58
-3
lines changed

3 files changed

+58
-3
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ In order to lazy load the images of your presentation, provide their url using t
126126

127127
## Theming
128128

129-
Theming is an ongoing improvement I'm currently working on. The already available options are described in the slides [documentation](doc/slides/slides.md).
129+
[DeckDeckGo] offers various theming options which could be set using CSS variables and which are described in their respective slides' templates [documentation](doc/slides/slides.md).
130+
131+
*Note: If you would miss or need further theming options, don't hesitate to open an issue and/or submit a PR, it would be my pleasure to add more theming flexibility and options*
130132

131133
## Talks
132134

doc/slides/slides.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,21 @@ This component offers the following options which could be set using attributes:
6363
</deckgo-slide-title>
6464
</deckgo-deck>
6565
```
66+
67+
### Theming
68+
69+
The following theming options will affect this component if set on its host or parent.
70+
71+
| CSS4 variable | Default | Note |
72+
| -------------------------- |:-----------------:|:-----------------:|
73+
| --background | | |
74+
| --color | | |
75+
| --slide-padding-top | 16px | Padding top of the all slide |
76+
| --slide-padding-end | 32px | Padding right of the all slide |
77+
| --slide-padding-bottom | 16px | Padding bottom of the all slide |
78+
| --slide-padding-start | 32px | Padding left of the all slide |
79+
| --slide-padding-start | 32px | Modify slotted ul and ol padding-inline-start |
80+
6681
## Slide: Content
6782

6883
The "Content" slide is a simple slide which display its title and content aligned to the start of the page.
@@ -115,6 +130,20 @@ This component offers the following options which could be set using attributes:
115130
</deckgo-deck>
116131
```
117132

133+
### Theming
134+
135+
The following theming options will affect this component if set on its host or parent.
136+
137+
| CSS4 variable | Default | Note |
138+
| -------------------------- |:-----------------:|:-----------------:|
139+
| --background | | |
140+
| --color | | |
141+
| --slide-padding-top | 16px | Padding top of the all slide |
142+
| --slide-padding-end | 32px | Padding right of the all slide |
143+
| --slide-padding-bottom | 16px | Padding bottom of the all slide |
144+
| --slide-padding-start | 32px | Padding left of the all slide |
145+
| --slide-padding-start | 32px | Modify slotted ul and ol padding-inline-start |
146+
118147
## Slide: Split
119148

120149
The "Split" slide is a simple slide which display two panes on the page.
@@ -154,6 +183,30 @@ This component offers the following options which could be set using attributes:
154183
| reveal | boolean | false | Hide the slotted elements `li`, `p` an `img` and display them when navigating using `slideNext()` or `slidePrev()` (see [documention](/doc/features/navigation.md)) |
155184
| reveal-show-first | boolean | false | Show the first elements which would be hidden if `reveal` is set to `true` |
156185

186+
### Theming
187+
188+
The following theming options will affect this component if set on its host or parent.
189+
190+
| CSS4 variable | Default | Note |
191+
| -------------------------- |:-----------------:|:-----------------:|
192+
| --background | | |
193+
| --color | | |
194+
| --slide-split-background-start | | Left split pane background |
195+
| --slide-split-color-start | | Left split pane color |
196+
| --slide-split-background-end | | Right split pane background |
197+
| --slide-split-color-end | | Right split pane color |
198+
| --slide-split-padding-top | 16px | Padding top of a slide split pane |
199+
| --slide-split-padding-end | 32px | Padding right of a slide split pane |
200+
| --slide-split-padding-bottom | 16px | Padding bottom of a slide split pane |
201+
| --slide-split-padding-start | 32px | Padding left of a slide split pane |
202+
| --slide-split-title-padding-top | 16px | Padding top of the title of the |
203+
| --slide-split-title-padding-end | 32px | Padding right of the title of the |
204+
| --slide-split-title-padding-bottom | 16px | Padding bottom of the title of the |
205+
| --slide-split-title-padding-start | 32px | Padding left of the title of the |
206+
| --slide-padding-start | 32px | Modify slotted ul and ol padding-inline-start |
207+
| --slide-split-align | inherit | Modify for example to center if you want to align the content in the middle |
208+
| --slide-split-text-align | inherit | Modify for example to center if you want to align the text in the middle |
209+
157210
## Slide: Code
158211

159212
The "Code" slide is a the slide to use if you would like to showcase code during your talk.

src/components/slides/deckdeckgo-slide-split/deckdeckgo-slide-split.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ div.deckgo-slide-split {
1616
align-items: var(--slide-split-align, inherit);
1717
text-align: var(--slide-split-text-align, inherit);
1818

19-
padding: var(--slide-padding-top, 16px) var(--slide-padding-end, 32px) var(--slide-padding-bottom, 16px) var(--slide-padding-start, 32px);
19+
padding: var(--slide-split-padding-top, 16px) var(--slide-split-padding-end, 32px) var(--slide-split-padding-bottom, 16px) var(--slide-split-padding-start, 32px);
2020

2121
&.deckgo-slide-split-start {
2222
background: var(--slide-split-background-start);
@@ -32,6 +32,6 @@ div.deckgo-slide-split {
3232
::slotted([slot="title"]) {
3333
flex: 1 100%;
3434

35-
padding: var(--slide-padding-top, 16px) var(--slide-padding-end, 32px) var(--slide-padding-bottom, 16px) var(--slide-padding-start, 32px);
35+
padding: var(--slide-split-title-padding-top, 16px) var(--slide-split-title-padding-end, 32px) var(--slide-split-title-padding-bottom, 16px) var(--slide-split-title-padding-start, 32px);
3636
}
3737

0 commit comments

Comments
 (0)