Skip to content

Commit 3321aea

Browse files
committed
Refines features carousel styling.
Updates carousel styles for better visual consistency, including layout improvements, typography, and theming with VSCode variables. Enhances maintainability and prepares for future feature image integration. (#4769, #4773, PLG-138)
1 parent 4d14b71 commit 3321aea

File tree

3 files changed

+66
-10
lines changed

3 files changed

+66
-10
lines changed
Lines changed: 11 additions & 0 deletions
Loading

src/webviews/apps/welcome/components/feature-carousel.ts

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ export class GlFeatureCarousel extends LitElement {
1515
static override styles = [
1616
css`
1717
:host {
18+
--gl-carousel-border-radius: 0;
19+
--gl-carousel-background-color: transparent;
20+
--gl-carousel-padding: 1rem;
21+
1822
display: block;
1923
width: 100%;
2024
}
@@ -36,8 +40,11 @@ export class GlFeatureCarousel extends LitElement {
3640
display: flex;
3741
align-items: center;
3842
justify-content: center;
39-
}
4043
44+
border-radius: var(--gl-carousel-border-radius);
45+
background-color: var(--gl-carousel-background-color);
46+
padding: var(--gl-carousel-padding);
47+
}
4148
4249
::slotted(*) {
4350
display: none;
@@ -117,19 +124,19 @@ export class GlFeatureCard extends LitElement {
117124
css`
118125
:host {
119126
display: flex;
127+
gap: 1rem;
120128
}
121129
122130
.image {
123-
}
124-
.content {
125-
}
126-
::slotted(img) {
127-
}
128-
129-
::slotted(h1) {
131+
width: 50%;
130132
}
131133
132-
::slotted(p) {
134+
.content {
135+
margin-top: 0.5rem;
136+
flex: 1;
137+
display: flex;
138+
flex-direction: column;
139+
gap: 0.5rem;
133140
}
134141
`,
135142
];

src/webviews/apps/welcome/welcome.css.ts

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import { css } from 'lit';
33
const colorScheme = css`
44
:host {
55
--accent-color: #cb64ff;
6+
--text-color: var(--vscode-descriptionForeground);
7+
--em-color: var(--vscode-editor-foreground);
8+
--link-color: var(--vscode-textLink-foreground);
69
710
--hero-gradient: radial-gradient(76.32% 76.32% at 50% 7.24%, #7b00ff 29.72%, rgba(255, 0, 242, 0) 100%);
811
}
@@ -12,12 +15,14 @@ const typography = css`
1215
:host {
1316
--h1-font-size: 1.4rem;
1417
--p-font-size: 1rem;
18+
--card-font-size: var(--vscode-font-size);
1519
}
1620
1721
@media (max-width: 640px) {
1822
:host {
1923
--h1-font-size: 0.75rem;
2024
--p-font-size: 0.7rem;
25+
--card-font-size: var(--vscode-editor-font-size);
2126
}
2227
}
2328
`;
@@ -89,13 +94,46 @@ const header = css`
8994
margin-bottom: 0;
9095
9196
font-size: var(--h1-font-size);
97+
color: var(--em-text-color);
9298
}
9399
.header p {
94-
color: var(--vscode-descriptionForeground);
100+
color: var(--text-color);
101+
}
102+
`;
103+
104+
const carousel = css`
105+
gl-feature-carousel {
106+
text-align: initial;
107+
--gl-carousel-border-radius: 0.65rem;
108+
--gl-carousel-background-color: var(--vscode-textBlockQuote-background);
109+
}
110+
111+
gl-feature-carousel h1 {
112+
margin: 0;
113+
font-size: var(--card-font-size);
114+
color: var(--em-color);
115+
}
116+
117+
gl-feature-carousel p {
118+
margin: 0.4em 0;
119+
font-size: var(--card-font-size);
120+
color: var(--text-color);
121+
}
122+
123+
gl-feature-carousel img {
124+
max-width: 100%;
125+
height: auto;
126+
border-radius: 0.4rem;
127+
}
128+
129+
gl-feature-carousel a {
130+
color: var(--link-color);
131+
text-decoration: none;
95132
}
96133
`;
97134

98135
export const welcomeStyles = css`
99136
${colorScheme} ${typography}
100137
${heroGradient} ${section} ${header}
138+
${carousel}
101139
`;

0 commit comments

Comments
 (0)