-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(themes): adjusted scss structure for additional themes
Related #4967
- Loading branch information
1 parent
5aa112a
commit c2cf3b0
Showing
12 changed files
with
244 additions
and
29 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
|
||
// iOS Theme | ||
@import "themes/default.ios"; | ||
// iOS Globals | ||
@import "globals.ios"; | ||
|
||
|
||
// iOS Components | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,7 @@ | |
|
||
// Global include-rtl | ||
$include-rtl: true !default; | ||
|
||
|
||
// Global font path | ||
$font-path: "../fonts" !default; |
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,68 @@ | ||
@import "./dark"; | ||
|
||
// iOS Dark Theme | ||
// ---------------------------------- | ||
|
||
$colors-ios: map-merge($colors, ()) !default; | ||
|
||
$text-ios-color: $text-color !default; | ||
$paragraph-ios-color: $paragraph-color !default; | ||
$link-ios-color: map-get($colors-ios, primary) !default; | ||
$background-ios-color: $background-color !default; | ||
$subdued-text-ios-color: $subdued-text-color !default; | ||
|
||
$font-family-ios-base: $font-family-base !default; | ||
$font-size-ios-base: $font-size-base !default; | ||
|
||
|
||
// iOS Toolbar | ||
// -------------------------------------------------- | ||
|
||
$toolbar-ios-background: $toolbar-background !default; | ||
$toolbar-ios-border-color: $toolbar-border-color !default; | ||
$toolbar-ios-text-color: $toolbar-text-color !default; | ||
$toolbar-ios-active-color: $toolbar-active-color !default; | ||
$toolbar-ios-inactive-color: $toolbar-inactive-color !default; | ||
|
||
|
||
// iOS List | ||
// -------------------------------------------------- | ||
|
||
$list-ios-text-color: $list-text-color !default; | ||
$list-ios-border-color: $list-border-color !default; | ||
$list-ios-background-color: $list-background-color !default; | ||
$list-ios-activated-background-color: #d9d9d9 !default; | ||
|
||
|
||
// iOS Item | ||
// -------------------------------------------------- | ||
|
||
$item-ios-padding-top: 12px !default; | ||
$item-ios-padding-right: 16px !default; | ||
$item-ios-padding-bottom: 13px !default; | ||
$item-ios-padding-left: 16px !default; | ||
$item-ios-padding-media-top: 10px !default; | ||
$item-ios-padding-media-bottom: 10px !default; | ||
$item-ios-padding-icon-top: 10px !default; | ||
$item-ios-padding-icon-bottom: 9px !default; | ||
|
||
|
||
// iOS Icon | ||
// -------------------------------------------------- | ||
|
||
$icon-detail-push-background-svg: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 20'><path d='M2,20l-2-2l8-8L0,2l2-2l10,10L2,20z' fill='fg-color'/></svg>" !default; | ||
|
||
@mixin ios-detail-push-icon($fg-color) { | ||
$svg: str-replace($icon-detail-push-background-svg, 'fg-color', $fg-color); | ||
@include svg-background-image($svg); | ||
} | ||
|
||
|
||
// iOS Body | ||
// -------------------------------------------------- | ||
|
||
@mixin ios-body() { | ||
font-family: $font-family-ios-base; | ||
font-size: $font-size-ios-base; | ||
background-color: $background-ios-color; | ||
} |
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,73 @@ | ||
@import "./dark"; | ||
|
||
// Material Design Dark Theme | ||
// ---------------------------------- | ||
|
||
$colors-md: map-merge($colors, ()) !default; | ||
|
||
|
||
$text-md-color: $text-color !default; | ||
$paragraph-md-color: $paragraph-color !default; | ||
$link-md-color: map-get($colors-md, primary) !default; | ||
$background-md-color: $background-color !default; | ||
$subdued-text-md-color: $subdued-text-color !default; | ||
|
||
$font-family-md-base: "Roboto", "Helvetica Neue", sans-serif !default; | ||
$font-size-md-base: $font-size-base !default; | ||
|
||
|
||
// Material Design Toolbar | ||
// -------------------------------------------------- | ||
|
||
$toolbar-md-background: $toolbar-background !default; | ||
$toolbar-md-border-color: $toolbar-border-color !default; | ||
$toolbar-md-text-color: #424242 !default; | ||
$toolbar-md-active-color: $toolbar-active-color !default; | ||
$toolbar-md-inactive-color: $toolbar-inactive-color !default; | ||
$toolbar-md-button-color: #424242 !default; | ||
|
||
|
||
// Material Design List | ||
// -------------------------------------------------- | ||
|
||
$list-md-text-color: $list-text-color !default; | ||
$list-md-border-color: #dedede !default; | ||
$list-md-background-color: $list-background-color !default; | ||
$list-md-activated-background-color: #f1f1f1 !default; | ||
|
||
|
||
// Material Design Item | ||
// -------------------------------------------------- | ||
|
||
$item-md-padding-top: 13px !default; | ||
$item-md-padding-right: 16px !default; | ||
$item-md-padding-bottom: 13px !default; | ||
$item-md-padding-left: 16px !default; | ||
$item-md-padding-media-top: 9px !default; | ||
$item-md-padding-media-bottom: 9px !default; | ||
$item-md-padding-icon-top: 11px !default; | ||
$item-md-padding-icon-bottom: 10px !default; | ||
|
||
|
||
// Ripple Color | ||
// -------------------------------------------------- | ||
|
||
@function ripple-background-color($button-color) { | ||
@return rgba( red($button-color), green($button-color), blue($button-color), 0.1); | ||
} | ||
|
||
|
||
// Material Design Body | ||
// -------------------------------------------------- | ||
|
||
@mixin md-body() { | ||
font-family: $font-family-md-base; | ||
font-size: $font-size-md-base; | ||
background-color: $background-md-color; | ||
} | ||
|
||
|
||
// Roboto Font | ||
@at-root { | ||
@import "../fonts/roboto"; | ||
} |
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,35 @@ | ||
@import '../globals.core'; | ||
|
||
|
||
// Dark Theme | ||
// ---------------------------------- | ||
|
||
$colors: ( | ||
|
||
primary: #327eff, | ||
secondary: #32db64, | ||
danger: #f53d3d, | ||
light: #f4f4f4, | ||
dark: #222, | ||
|
||
) !default; | ||
|
||
|
||
$text-color: #fff !default; | ||
$paragraph-color: $text-color !default; | ||
$link-color: map-get($colors, primary) !default; | ||
$background-color: #000 !default; | ||
$subdued-text-color: #666 !default; | ||
|
||
$font-family-base: -apple-system, "Helvetica Neue", "Roboto", sans-serif !default; | ||
$font-size-base: 1.4rem !default; // 1.4rem == 14px | ||
|
||
$toolbar-background: #000 !default; | ||
$toolbar-border-color: #b2b2b2 !default; | ||
$toolbar-text-color: $text-color !default; | ||
$toolbar-active-color: $link-color !default; | ||
$toolbar-inactive-color: #8c8c8c !default; | ||
|
||
$list-text-color: $text-color !default; | ||
$list-background-color: $background-color !default; | ||
$list-border-color: #c8c7cc !default; |
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
@import '../globals.core'; | ||
|
||
|
||
// Default Theme | ||
// ---------------------------------- | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
// For E2E dark theme tests | ||
|
||
@import "../../ionic/themes/dark.ios.scss"; | ||
|
||
@import "../../ionic/ionic.ios.scss"; |
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,6 @@ | ||
|
||
// For E2E dark theme tests | ||
|
||
@import "../../ionic/themes/dark.md.scss"; | ||
|
||
@import "../../ionic/ionic.md.scss"; |