-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: extract vertical layout styles into CSS literal (#8546)
- Loading branch information
1 parent
3c6492d
commit dc87442
Showing
4 changed files
with
52 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
packages/vertical-layout/src/vaadin-vertical-layout-styles.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/** | ||
* @license | ||
* Copyright (c) 2017 - 2025 Vaadin Ltd. | ||
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ | ||
*/ | ||
import type { CSSResult } from 'lit'; | ||
|
||
export const verticalLayoutStyles: CSSResult; |
32 changes: 32 additions & 0 deletions
32
packages/vertical-layout/src/vaadin-vertical-layout-styles.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/** | ||
* @license | ||
* Copyright (c) 2017 - 2025 Vaadin Ltd. | ||
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ | ||
*/ | ||
import { css } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js'; | ||
|
||
export const verticalLayoutStyles = css` | ||
:host { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: flex-start; | ||
box-sizing: border-box; | ||
} | ||
:host([hidden]) { | ||
display: none !important; | ||
} | ||
/* Theme variations */ | ||
:host([theme~='margin']) { | ||
margin: 1em; | ||
} | ||
:host([theme~='padding']) { | ||
padding: 1em; | ||
} | ||
:host([theme~='spacing']) { | ||
gap: 1em; | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters