feat(ui): own responsive marketing layout APIs
This commit is contained in:
@@ -9,6 +9,11 @@ component CTASection {
|
||||
color: string = "primary"
|
||||
variant: string = "solid"
|
||||
spacing: string = "none"
|
||||
radius: string = "default"
|
||||
titleMaxWidth: string = ""
|
||||
contentPadding: string = "default"
|
||||
mobilePadding: string = "default"
|
||||
mobileActions: string = "stack"
|
||||
primaryLabel: string = "Get started"
|
||||
primaryHref: string = "#"
|
||||
primaryIcon: string = ""
|
||||
@@ -37,6 +42,8 @@ component CTASection {
|
||||
data-color='{color}'
|
||||
data-variant='{variant}'
|
||||
data-spacing='{spacing}'
|
||||
data-radius='{radius}' data-content-padding='{contentPadding}' data-mobile-padding='{mobilePadding}' data-mobile-actions='{mobileActions}'
|
||||
style='--wrn-cta-title-max-width: {titleMaxWidth || "18ch"}'
|
||||
data-max-width='{maxWidth}'
|
||||
data-full-bleed='{fullBleed ? "true" : "false"}'
|
||||
data-visual-position='{visualPosition}'
|
||||
@@ -288,6 +295,8 @@ component CTASection {
|
||||
0 1px 0 color-mix(in srgb, white 5%, transparent) inset,
|
||||
0 24px 70px color-mix(in srgb, black 15%, transparent);
|
||||
}
|
||||
.wrn-cta-section[data-radius="xl"] .wrn-cta-section__surface { border-radius: 1.5rem; }
|
||||
.wrn-cta-section[data-content-padding="lg"] .wrn-cta-section__surface { padding: 3.5rem clamp(1.5rem, 5vw, 4rem); }
|
||||
|
||||
.wrn-cta-section[data-size="compact"] .wrn-cta-section__surface,
|
||||
.wrn-cta-section[data-size="sm"] .wrn-cta-section__surface {
|
||||
@@ -429,7 +438,7 @@ component CTASection {
|
||||
}
|
||||
|
||||
.wrn-cta-section__title {
|
||||
max-width: 18ch;
|
||||
max-width: var(--wrn-cta-title-max-width);
|
||||
margin: 0.75rem 0 0;
|
||||
color: var(--wrn-color-text);
|
||||
font-size: clamp(2rem, 5vw, 4rem);
|
||||
@@ -665,11 +674,11 @@ component CTASection {
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.wrn-cta-section__footer:empty {
|
||||
.wrn-cta-section__footer:not(:has(> *)) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.wrn-cta-section__footer:not(:empty) {
|
||||
.wrn-cta-section__footer:has(> *) {
|
||||
margin-top: 2rem;
|
||||
padding-top: 1.25rem;
|
||||
border-top: 1px solid color-mix(in srgb, currentColor 14%, transparent);
|
||||
@@ -699,6 +708,8 @@ component CTASection {
|
||||
}
|
||||
|
||||
@media (max-width: 639px) {
|
||||
.wrn-cta-section[data-mobile-padding="md"] .wrn-cta-section__surface { padding: 2.5rem 1.25rem; }
|
||||
.wrn-cta-section[data-mobile-actions="inline"] .wrn-cta-section__action { width: auto; }
|
||||
.wrn-cta-section__surface {
|
||||
padding: 1.6rem;
|
||||
border-radius: 1.2rem;
|
||||
|
||||
Reference in New Issue
Block a user