mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 16:16:41 +08:00
Issue number: internal --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Add tokens usage on global css files for Ionic theme. - Removed global background an text variables and fixed variables names used on `body`. This resulted in some changes on test pages colors, hence the snapshots differences. ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer for more information. --> --------- Co-authored-by: ionitron <hi@ionicframework.com>
117 lines
2.6 KiB
SCSS
117 lines
2.6 KiB
SCSS
@use "../../themes/ionic/ionic.globals.scss" as globals;
|
|
|
|
// Link: Shared Styles (Standalone & Underline)
|
|
// -------------------------------------------------------------------------------
|
|
@mixin link-shared {
|
|
display: inline-flex;
|
|
|
|
align-items: center;
|
|
|
|
gap: globals.$ion-space-100;
|
|
|
|
transition: color globals.$ion-transition-time-200 ease-in-out;
|
|
|
|
font-weight: globals.$ion-font-weight-regular;
|
|
|
|
text-decoration-color: inherit;
|
|
|
|
text-underline-offset: globals.$ion-scale-050;
|
|
|
|
cursor: pointer;
|
|
|
|
// Link: Visited
|
|
// -------------------------------------------------------------------------------
|
|
|
|
&:visited {
|
|
color: globals.$ion-text-link-visited;
|
|
}
|
|
}
|
|
|
|
// Link: Standalone
|
|
// -------------------------------------------------------------------------------
|
|
|
|
@mixin ionic-link {
|
|
color: globals.$ion-text-link-default;
|
|
|
|
text-decoration: none;
|
|
|
|
@include link-shared;
|
|
|
|
// Link: Standalone - Hover
|
|
// -------------------------------------------------------------------------------
|
|
|
|
@media (any-hover: hover) {
|
|
&:hover {
|
|
text-decoration: underline;
|
|
}
|
|
}
|
|
|
|
// Link: Standalone - Focus
|
|
// -------------------------------------------------------------------------------
|
|
|
|
&:focus,
|
|
&.ion-focused {
|
|
@include globals.focused-state(null, null, globals.$ion-text-link-default);
|
|
|
|
text-decoration: underline;
|
|
}
|
|
|
|
// Link: Standalone - Active
|
|
// -------------------------------------------------------------------------------
|
|
|
|
&:active,
|
|
&.ion-activated {
|
|
color: globals.$ion-text-link-press;
|
|
|
|
text-decoration: underline;
|
|
}
|
|
}
|
|
|
|
a.ionic-link,
|
|
:not(a).ionic-link a {
|
|
@include ionic-link;
|
|
}
|
|
|
|
// Link: Underline
|
|
// -------------------------------------------------------------------------------
|
|
|
|
@mixin ionic-link-underline {
|
|
color: currentColor;
|
|
|
|
text-decoration: underline;
|
|
|
|
@include link-shared;
|
|
|
|
// Link: Underline - Hover
|
|
// -------------------------------------------------------------------------------
|
|
|
|
@media (any-hover: hover) {
|
|
&:hover {
|
|
color: globals.$ion-text-link-press;
|
|
}
|
|
}
|
|
|
|
// Link: Underline - Focus
|
|
// -------------------------------------------------------------------------------
|
|
|
|
&:focus,
|
|
&.ion-focused {
|
|
@include globals.focused-state(null, null, globals.$ion-text-link-default);
|
|
|
|
text-decoration: none;
|
|
}
|
|
|
|
// Link: Underline - Active
|
|
// -------------------------------------------------------------------------------
|
|
|
|
&:active,
|
|
&.ion-activated {
|
|
color: globals.$ion-text-link-press;
|
|
}
|
|
}
|
|
|
|
a.ionic-link-underline,
|
|
:not(a).ionic-link-underline a {
|
|
@include ionic-link-underline;
|
|
}
|