Skip to content

Commit

Permalink
feat(core): rename "theme-dark" class for dark mode to "dark"
Browse files Browse the repository at this point in the history
  • Loading branch information
nolimits4web committed Oct 5, 2021
1 parent 0dd8967 commit 8144a59
Show file tree
Hide file tree
Showing 13 changed files with 51 additions and 51 deletions.
6 changes: 3 additions & 3 deletions src/core/components/app/app.less
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ body {
line-height: var(--f7-line-height);
color: var(--f7-text-color);
}
.theme-dark body,
body.theme-dark {
.dark body,
body.dark {
background: #000;
}
.theme-dark {
.dark {
color: var(--f7-text-color);
}
.framework7-root {
Expand Down
2 changes: 1 addition & 1 deletion src/core/components/input/input.less
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ textarea {
}

.if-dark-theme({
.theme-dark option {
.dark option {
background-color: var(--f7-page-bg-color);
}
});
Expand Down
2 changes: 1 addition & 1 deletion src/core/components/login-screen/login-screen.less
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
}
}

.theme-dark {
.dark {
.login-screen-content .list ul,
.login-screen-content .block-strong,
.login-screen-page .list ul,
Expand Down
2 changes: 1 addition & 1 deletion src/core/components/notification/notification-aurora.less
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
}
}
.if-dark-theme({
.theme-dark, &.theme-dark {
.dark, &.dark {
.notification-close-button:after {
color: #fff;
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/components/notification/notification-ios.less
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
}
}
.if-dark-theme({
.theme-dark, &.theme-dark {
.dark, &.dark {
.notification-close-button:after {
color: #fff;
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/components/page/page-vars.less
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@
--f7-page-bg-color: #121212;
});
});
.theme-dark {
.dark {
--f7-page-master-border-color: rgba(255, 255, 255, 0.2);
}
42 changes: 21 additions & 21 deletions src/core/components/popup/popup.less
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
z-index: 11000;
overflow: hidden;
border-radius: var(--f7-popup-border-radius);
.theme-dark &,
&.theme-dark {
.dark &,
&.dark {
background: #000;
}
&.modal-in,
Expand Down Expand Up @@ -105,14 +105,14 @@ html.with-modal-popup-push-closing {
}

.if-dark-theme({
&.theme-dark .framework7-root > .views,
&.theme-dark .framework7-root > .view,
.theme-dark .framework7-root > .views,
.theme-dark .framework7-root > .view,
.theme-dark.framework7-root > .views,
.theme-dark.framework7-root > .view,
.framework7-root > .views.theme-dark,
.framework7-root > .view.theme-dark {
&.dark .framework7-root > .views,
&.dark .framework7-root > .view,
.dark .framework7-root > .views,
.dark .framework7-root > .view,
.dark.framework7-root > .views,
.dark.framework7-root > .view,
.framework7-root > .views.dark,
.framework7-root > .view.dark {
&:after {
content: '';
position: absolute;
Expand Down Expand Up @@ -155,9 +155,9 @@ html.with-modal-popup-push {
opacity: 0;
}
.if-dark-theme({
&.theme-dark .popup:after,
.theme-dark .popup:after,
.theme-dark.popup:after {
&.dark .popup:after,
.dark .popup:after,
.dark.popup:after {
background: rgba(255,255,255,0.05);
}
});
Expand Down Expand Up @@ -187,14 +187,14 @@ html.with-modal-popup-push {

.if-dark-theme({
html.with-modal-popup-push-closing {
&.theme-dark .framework7-root > .views,
&.theme-dark .framework7-root > .view,
.theme-dark .framework7-root > .views,
.theme-dark .framework7-root > .view,
.theme-dark.framework7-root > .views,
.theme-dark.framework7-root > .view,
.framework7-root > .views.theme-dark,
.framework7-root > .view.theme-dark {
&.dark .framework7-root > .views,
&.dark .framework7-root > .view,
.dark .framework7-root > .views,
.dark .framework7-root > .view,
.dark.framework7-root > .views,
.dark.framework7-root > .view,
.framework7-root > .views.dark,
.framework7-root > .view.dark {
&:after {
animation: popup-dark-push-overlay-fade-out var(--f7-popup-transition-duration) forwards;
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/components/searchbar/searchbar.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

.searchbar {
--f7-link-highlight-color: var(--f7-link-highlight-black);
.theme-dark & {
.dark & {
--f7-link-highlight-color: var(--f7-link-highlight-white);
}
width: 100%;
Expand Down
32 changes: 16 additions & 16 deletions src/core/components/sheet/sheet.less
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,14 @@ html.with-modal-sheet-push-closing {
}
}
.if-dark-theme({
&.theme-dark .framework7-root > .views,
&.theme-dark .framework7-root > .view,
.theme-dark .framework7-root > .views,
.theme-dark .framework7-root > .view,
.theme-dark.framework7-root > .views,
.theme-dark.framework7-root > .view,
.framework7-root > .views.theme-dark,
.framework7-root > .view.theme-dark {
&.dark .framework7-root > .views,
&.dark .framework7-root > .view,
.dark .framework7-root > .views,
.dark .framework7-root > .view,
.dark.framework7-root > .views,
.dark.framework7-root > .view,
.framework7-root > .views.dark,
.framework7-root > .view.dark {
&:after {
content: '';
position: absolute;
Expand Down Expand Up @@ -149,14 +149,14 @@ html.with-modal-sheet-push {

.if-dark-theme({
html.with-modal-sheet-push-closing {
&.theme-dark .framework7-root > .views,
&.theme-dark .framework7-root > .view,
.theme-dark .framework7-root > .views,
.theme-dark .framework7-root > .view,
.theme-dark.framework7-root > .views,
.theme-dark.framework7-root > .view,
.framework7-root > .views.theme-dark,
.framework7-root > .view.theme-dark {
&.dark .framework7-root > .views,
&.dark .framework7-root > .view,
.dark .framework7-root > .views,
.dark .framework7-root > .view,
.dark.framework7-root > .views,
.dark.framework7-root > .view,
.framework7-root > .views.dark,
.framework7-root > .view.dark {
&:after {
animation: sheet-dark-push-overlay-fade-out var(--f7-sheet-transition-duration) forwards;
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/components/skeleton/skeleton-vars.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
--skeleton-color: #ccc;
--skeleton-icon-color: rgba(0, 0, 0, 0.25);
}
.theme-dark {
.dark {
--skeleton-color: #515151;
--skeleton-icon-color: rgba(255, 255, 255, 0.25);
}
2 changes: 1 addition & 1 deletion src/core/components/text-editor/text-editor-class.js
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ class TextEditor extends Framework7Class {
const self = this;
self.popover = self.app.popover.create({
content: `
<div class="popover theme-dark text-editor-popover">
<div class="popover dark text-editor-popover">
<div class="popover-inner">${self.renderButtons()}</div>
</div>
`,
Expand Down
2 changes: 1 addition & 1 deletion src/core/components/touch-ripple/touch-ripple-vars.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
--f7-touch-ripple-white: rgba(255, 255, 255, 0.3);
--f7-touch-ripple-color: var(--f7-touch-ripple-black);
}
.theme-dark {
.dark {
--f7-touch-ripple-color: var(--f7-touch-ripple-white);
}
4 changes: 2 additions & 2 deletions src/core/less/mixins.less
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
}
.dark-vars(@ruleset) {
& when (@includeDarkTheme) {
.theme-dark,
&.theme-dark {
.dark,
&.dark {
@ruleset();
}
}
Expand Down

0 comments on commit 8144a59

Please sign in to comment.