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

Commit 99bef70

Browse files
fix: gif editable elements size and fonts
1 parent adf9a6e commit 99bef70

File tree

5 files changed

+65
-16
lines changed

5 files changed

+65
-16
lines changed

docs/docs/components/app-components-gif/app-components-gif.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ The following theming options will affect this component if set on its host or p
5858
| --padding | | The padding of the `header` and `footer` over the gif |
5959
| --zIndex | 2 | The z-index of the slide |
6060
| --border-radius | | A radius for the border of the gif container |
61+
| --min-width | | The minimal width of the slotted elements header and footer |
62+
| --text-transform | | The text transform of the slotted elements header and footer |
63+
| --font-size-h2 | | The font size of the slotted elements header |
64+
| --font-weight-h2 | | The font weight of the slotted elements header |
65+
| --font-size-h3 | | The font size of the slotted elements footer |
66+
| --font-weight-h3 | | The font weight of the slotted elements footer |
6167

6268
## Note
6369

docs/src/app/pages/docs/components/app-components-gif/app-components-gif.tsx

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,36 @@ export class AppComponentsGif {
148148
<td></td>
149149
<td>A radius for the border of the gif container</td>
150150
</tr>
151+
<tr>
152+
<td>--min-width</td>
153+
<td></td>
154+
<td>The minimal width of the slotted elements header and footer</td>
155+
</tr>
156+
<tr>
157+
<td>--text-transform</td>
158+
<td></td>
159+
<td>The text transform of the slotted elements header and footer</td>
160+
</tr>
161+
<tr>
162+
<td>--font-size-h2</td>
163+
<td></td>
164+
<td>The font size of the slotted elements header</td>
165+
</tr>
166+
<tr>
167+
<td>--font-weight-h2</td>
168+
<td></td>
169+
<td>The font weight of the slotted elements header</td>
170+
</tr>
171+
<tr>
172+
<td>--font-size-h3</td>
173+
<td></td>
174+
<td>The font size of the slotted elements footer</td>
175+
</tr>
176+
<tr>
177+
<td>--font-weight-h3</td>
178+
<td></td>
179+
<td>The font weight of the slotted elements footer</td>
180+
</tr>
151181
</tbody></table>
152182
<h2 id="app-components-gif-note">Note</h2>
153183
<p>Of course, as other images added to a presentation build with <a href="https://deckdeckgo.com">DeckDeckGo</a>, gifs are lazy loaded too. </p>

studio/src/global/theme/editor/editor-deck-fonts.scss

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
// Synchro with https://github.com/deckgo/deckdeckgo-starter/blob/master/src/css/font.css
22

33
deckgo-deck {
4-
*:not(b), h3, h4, h5, h6 {
4+
*:not(b), h1, h2, h3, h4, h5, h6 {
55
font-weight: 300;
66
}
77

8+
--font-size-h1: 3em;
9+
--font-size-h2: 2em;
10+
--font-size-h3: 1.4em;
11+
12+
--font-weight-h1: 300;
13+
--font-weight-h2: 300;
14+
--font-weight-h3: 300;
15+
816
a, strong {
917
font-weight: 500;
1018
}

studio/src/global/theme/editor/editor-deck.scss

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,12 @@ deckgo-deck {
1313
border: 1px solid var(--ion-color-light);
1414

1515
padding: 8px;
16-
17-
&:focus {
18-
outline: 0;
19-
box-shadow: 0 0 0 3px rgba(var(--ion-color-primary-rgb), .5);
20-
}
21-
}
22-
23-
h1 {
24-
min-height: calc(var(--font-size-h1) + 4px);
25-
}
26-
27-
h2 {
28-
min-height: calc(var(--font-size-h2) + 4px);
2916
}
3017

31-
h3 {
32-
min-height: calc(var(--font-size-h3) + 4px);
18+
deckgo-slide-gif {
19+
--min-width: 75%;
20+
--border-radius: 2px;
21+
--text-transform: uppercase;
3322
}
3423

3524
p {

webcomponents/core/src/components/extra/deckdeckgo-gif/deckdeckgo-gif.scss

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,22 @@ div.deckgo-gif {
1818
background: var(--background);
1919
color: var(--color);
2020
padding: var(--padding, 8px);
21+
22+
min-width: var(--min-width);
23+
border-radius: var(--border-radius);
24+
text-transform: var(--text-transform);
25+
26+
overflow: hidden;
27+
}
28+
29+
::slotted([slot="header"]) {
30+
font-size: var(--font-size-h2, inherit);
31+
font-weight: var(--font-weight-h2, inherit);
32+
}
33+
34+
::slotted([slot="footer"]) {
35+
font-size: var(--font-size-h3, inherit);
36+
font-weight: var(--font-weight-h3, inherit);
2137
}
2238

2339
::slotted([slot="header"]) {

0 commit comments

Comments
 (0)