-
Notifications
You must be signed in to change notification settings - Fork 13.5k
feat(input): add styles for ionic theme for fill=solid #30417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+377
−164
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
ceb1a3d
- add fill solid to ionic theme input;
JoaoFerreira-FrontEnd 646a856
- remove highlight styles for ionic theme;
JoaoFerreira-FrontEnd fd0daed
chore(): add updated snapshots
Ionitron ec486d6
- fix snapshots file name;
JoaoFerreira-FrontEnd d2e3c29
chore(): add updated snapshots
Ionitron bbf79fd
- lint.fix;
JoaoFerreira-FrontEnd 7ea7074
- reorganize fill vars
JoaoFerreira-FrontEnd 05dc23b
- update variables;
JoaoFerreira-FrontEnd 97bd20c
Merge branch 'next' into ROU-11889
JoaoFerreira-FrontEnd 217a0b9
- lint.fix
JoaoFerreira-FrontEnd 7be6907
Merge branch 'ROU-11889' of https://github.com/ionic-team/ionic-frame…
JoaoFerreira-FrontEnd 2734da0
Merge branch 'next' into ROU-11889
JoaoFerreira-FrontEnd 1e3183b
Ionic input has always a shape, so we don't need a default var value …
JoaoFerreira-FrontEnd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
---|---|---|
@@ -1,142 +1,6 @@ | ||
@use "../../themes/ionic/ionic.globals.scss" as globals; | ||
|
||
// Input Fill: Outline (Ionic Theme) | ||
// ---------------------------------------------------------------- | ||
|
||
:host(.input-fill-outline) { | ||
--border-radius: #{globals.$ion-border-radius-100}; | ||
--padding-start: #{globals.$ion-space-300}; | ||
--padding-end: #{globals.$ion-space-300}; | ||
} | ||
|
||
:host(.input-fill-outline.input-size-large) { | ||
--padding-start: #{globals.$ion-space-400}; | ||
--padding-end: #{globals.$ion-space-400}; | ||
} | ||
|
||
:host(.input-fill-outline.input-size-xlarge) { | ||
--padding-start: #{globals.$ion-space-500}; | ||
--padding-end: #{globals.$ion-space-500}; | ||
} | ||
|
||
/** | ||
* The bottom content should never have | ||
* a border with the outline style. | ||
*/ | ||
:host(.input-fill-outline) .input-bottom { | ||
border-top: none; | ||
} | ||
|
||
:host(.input-fill-outline) .input-wrapper { | ||
/** | ||
* For the ionic theme, the padding needs to sit on the | ||
* native wrapper instead, so that it sits within the | ||
* outline container but does not always affect the | ||
* label text. | ||
*/ | ||
@include globals.padding(0); | ||
|
||
/** | ||
* Outline inputs do not have a bottom border. | ||
* Instead, they have a border that wraps the | ||
* input + label. | ||
*/ | ||
border-bottom: none; | ||
|
||
/** | ||
* Do not show a background on the input wrapper as | ||
* this includes the label, instead we apply the | ||
* background to the native wrapper. | ||
*/ | ||
background: transparent; | ||
} | ||
|
||
:host(.input-fill-outline.input-label-placement-stacked) .label-text-wrapper { | ||
@include globals.transform-origin(start, top); | ||
|
||
/** | ||
* Label text should not extend | ||
* beyond the bounds of the input. | ||
*/ | ||
max-width: calc(100% - var(--padding-start) - var(--padding-end)); | ||
} | ||
|
||
:host(.input-fill-outline) .label-text-wrapper { | ||
/** | ||
* The label should appear on top of an outline | ||
* container that overlaps it so it is always clickable. | ||
*/ | ||
position: relative; | ||
} | ||
|
||
:host(.input-fill-outline) .native-wrapper { | ||
@include globals.border-radius(inherit); | ||
@include globals.padding(var(--padding-top), var(--padding-end), var(--padding-bottom), var(--padding-start)); | ||
|
||
min-height: globals.$ion-scale-1000; | ||
|
||
/** | ||
* Apply the background to the native input | ||
* wrapper to only style the input. | ||
*/ | ||
background: var(--background); | ||
} | ||
|
||
// Input Fill: Outline, Outline Container | ||
// ---------------------------------------------------------------- | ||
|
||
:host(.input-fill-outline) .input-outline { | ||
@include globals.position(0, 0, 0, 0); | ||
@include globals.border-radius(var(--border-radius)); | ||
|
||
position: absolute; | ||
|
||
width: 100%; | ||
height: 100%; | ||
|
||
pointer-events: none; | ||
|
||
border: var(--border-width) var(--border-style) var(--border-color); | ||
} | ||
|
||
// Input Fill: Outline, Label Placement: Stacked | ||
// ---------------------------------------------------------------- | ||
|
||
// This makes the label sit above the input. | ||
:host(.label-floating.input-fill-outline.input-label-placement-stacked) .label-text-wrapper { | ||
@include globals.margin(0); | ||
@include globals.padding(globals.$ion-space-100, null); | ||
} | ||
|
||
// Start/End Slots | ||
// ---------------------------------------------------------------- | ||
|
||
:host(.input-fill-outline) ::slotted([slot="start"]) { | ||
margin-inline-end: globals.$ion-space-200; | ||
} | ||
|
||
:host(.input-fill-outline) ::slotted([slot="end"]) { | ||
margin-inline-start: globals.$ion-space-200; | ||
} | ||
|
||
// Input Shapes | ||
// -------------------------------------------------- | ||
|
||
:host(.input-fill-outline.input-shape-soft) { | ||
--border-radius: #{globals.$ion-border-radius-200}; | ||
} | ||
|
||
:host(.input-fill-outline.input-shape-round) { | ||
--border-radius: #{globals.$ion-border-radius-400}; | ||
} | ||
|
||
:host(.input-fill-outline.input-shape-rectangular) { | ||
--border-radius: #{globals.$ion-border-radius-0}; | ||
} | ||
|
||
// Input Focus | ||
// ---------------------------------------------------------------- | ||
|
||
:host(.input-fill-outline.has-focus) { | ||
--border-width: #{globals.$ion-border-size-050}; | ||
--background: #{globals.$ion-primitives-base-white}; | ||
--border-color: #{globals.$ion-primitives-neutral-500}; | ||
} |
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.