-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: extract horizontal layout styles into CSS literal (#8510)
- Loading branch information
1 parent
08798b8
commit 26a4f52
Showing
4 changed files
with
50 additions
and
55 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
packages/horizontal-layout/src/vaadin-horizontal-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 horizontalLayoutStyles: CSSResult; |
30 changes: 30 additions & 0 deletions
30
packages/horizontal-layout/src/vaadin-horizontal-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,30 @@ | ||
/** | ||
* @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 horizontalLayoutStyles = css` | ||
:host { | ||
display: flex; | ||
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
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