123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318 |
- /*
- Note:
-
- :not(X) does not work if X is a complex selector like `.foo .bar` due to the spec of :not(X).
- Instead we have to use the following form for representing A:not(X A):not(Y A):not(Z A),
- which means `A which does not have any X, Y and Z as its ancestors`.
-
- // Equivalent to A:not(X A):not(Y A):not(Z A) { foo: bar; }
- A {
- // Apply styles for A
- foo: bar;
- }
- X A,
- Y A,
- Z A {
- // Subtract `X A`, `Y A` and `Z A`
- // (Restore original styles of A)
- }
- */
-
- /*
- Note:
-
- @apply has been deprecated as of Oct, 2017.
- Please do not use @apply to restore original styles.
- */
-
- /* Bars and page contents */
- @media (orientation: portrait) {
- /* Outermost toolbar */
- html[onsflag-iphonex-portrait] .toolbar {
- top: 0;
- box-sizing: content-box;
- padding-top: var(--iphonex-safe-area-inset-top-portrait);
- }
- /* Non-outermost */
- html[onsflag-iphonex-portrait] .dialog .toolbar, /* if wrapped with dialogs */
- html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background+.page__content .toolbar, /* if wrapped with a page with a toolbar */
- html[onsflag-iphonex-portrait] .tabbar--top__content .toolbar { /* if wrapped with a top tabbar */
- /* Restore original styles */
- top: 0;
- box-sizing: border-box;
- padding-top: 0;
- }
-
- /* Outermost bottom-bar */
- html[onsflag-iphonex-portrait] .bottom-bar {
- bottom: 0;
- box-sizing: content-box;
- padding-bottom: var(--iphonex-safe-area-inset-bottom-portrait);
- }
- /* Non-outermost */
- html[onsflag-iphonex-portrait] .dialog .bottom-bar, /* if wrapped with dialogs */
- html[onsflag-iphonex-portrait] .page-with-bottom-toolbar > .page__content .bottom-bar, /* if wrapped with a page with a bottom-bar */
- html[onsflag-iphonex-portrait] .tabbar__content:not(.tabbar--top__content) .bottom-bar { /* if wrapped with a bottom tabbar */
- /* Restore original styles */
- bottom: 0;
- box-sizing: border-box;
- padding-bottom: 0;
- }
-
- /* Outermost page__content without toolbars or bottom-bars */
- html[onsflag-iphonex-portrait] .page__content {
- top: 0;
- padding-top: var(--iphonex-safe-area-inset-top-portrait);
- bottom: 0;
- padding-bottom: var(--iphonex-safe-area-inset-bottom-portrait);
- }
- /* Non-outermost */
- html[onsflag-iphonex-portrait] .dialog .page__content, /* if wrapped with dialogs */
- html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background+.page__content .page__content, /* if wrapped with a page with a toolbar */
- html[onsflag-iphonex-portrait] .tabbar--top__content .page__content, /* if wrapped with a top tabbar */
- html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background+.page__content { /* if the page has a toolbar */
- /* Restore original styles */
- top: 0;
- padding-top: 0;
- }
- html[onsflag-iphonex-portrait] .dialog .page__content, /* if wrapped with dialogs */
- html[onsflag-iphonex-portrait] .page-with-bottom-toolbar > .page__content .page__content, /* if wrapped with a page with a bottom-bar */
- html[onsflag-iphonex-portrait] .tabbar__content:not(.tabbar--top__content) .page__content, /* if wrapped with a bottom tabbar */
- html[onsflag-iphonex-portrait] .page-with-bottom-toolbar > .page__content { /* if the page has a bottom-bar */
- /* Restore original styles */
- bottom: 0;
- padding-bottom: 0;
- }
-
- /* Outermost page__content with a toolbar */
- html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background,
- html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background+.page__content {
- top: calc(var(--iphonex-safe-area-inset-top-portrait) + var(--toolbar-height));
- padding-top: 0;
- }
- /* Non-outermost */
- html[onsflag-iphonex-portrait] .dialog .toolbar:not(.toolbar--cover-content)+.page__background,
- html[onsflag-iphonex-portrait] .dialog .toolbar:not(.toolbar--cover-content)+.page__background+.page__content, /* if wrapped with dialogs */
-
- html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background+.page__content .toolbar:not(.toolbar--cover-content)+.page__background,
- html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background+.page__content .toolbar:not(.toolbar--cover-content)+.page__background+.page__content, /* if wrapped with a page with a toolbar */
-
- html[onsflag-iphonex-portrait] .tabbar--top__content .toolbar:not(.toolbar--cover-content)+.page__background,
- html[onsflag-iphonex-portrait] .tabbar--top__content .toolbar:not(.toolbar--cover-content)+.page__background+.page__content { /* if wrapped with a top tabbar */
- /* Restore original styles */
- top: var(--toolbar-height);
- padding-top: 0;
- }
-
- /* Outermost page__content with a bottom-bar */
- html[onsflag-iphonex-portrait] .page-with-bottom-toolbar > .page__content {
- bottom: calc(var(--iphonex-safe-area-inset-bottom-portrait) + var(--toolbar-height));
- padding-bottom: 0;
- }
- /* Non-outermost */
- html[onsflag-iphonex-portrait] .dialog .page-with-bottom-toolbar > .page__content, /* if wrapped with dialogs */
- html[onsflag-iphonex-portrait] .page-with-bottom-toolbar > .page__content .page-with-bottom-toolbar > .page__content, /* if wrapped with a page with a bottom-bar */
- html[onsflag-iphonex-portrait] .tabbar__content:not(.tabbar--top__content) .page-with-bottom-toolbar > .page__content { /* if wrapped with a bottom tabbar */
- /* Restore original styles */
- bottom: var(--toolbar-height);
- padding-bottom: 0;
- }
-
- /* Outermost page__content with a transparent cover-content toolbar and its direct descendant page_content */
- html[onsflag-iphonex-portrait] .toolbar.toolbar--transparent.toolbar--cover-content+.page__background+.page__content,
- html[onsflag-iphonex-portrait] .toolbar.toolbar--transparent.toolbar--cover-content+.page__background+.page__content .page_content {
- top: 0;
- padding-top: calc(var(--iphonex-safe-area-inset-top-portrait) + var(--toolbar-height));
- }
- /* Non-outermost */
- html[onsflag-iphonex-portrait] .dialog .toolbar.toolbar--transparent.toolbar--cover-content+.page__background+.page__content, /* if wrapped with dialogs */
- html[onsflag-iphonex-portrait] .dialog .toolbar.toolbar--transparent.toolbar--cover-content+.page__background+.page__content .page_content,
- html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background+.page__content .toolbar.toolbar--transparent.toolbar--cover-content+.page__background+.page__content, /* if wrapped with a page with a toolbar */
- html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background+.page__content .toolbar.toolbar--transparent.toolbar--cover-content+.page__background+.page__content .page__content,
- html[onsflag-iphonex-portrait] .tabbar--top__content .toolbar.toolbar--transparent.toolbar--cover-content+.page__background+.page__content,
- html[onsflag-iphonex-portrait] .tabbar--top__content .toolbar.toolbar--transparent.toolbar--cover-content+.page__background+.page__content .page_content { /* if wrapped with a top tabbar */
- /* Restore original styles */
- top: 0;
- padding-top: var(--toolbar-height);
- }
-
- /* Outermost top tabbar */
- html[onsflag-iphonex-portrait] .tabbar--top {
- padding-top: var(--iphonex-safe-area-inset-top-portrait);
- }
- /* Non-outermost */
- html[onsflag-iphonex-portrait] .dialog .tabbar--top, /* if wrapped with dialogs */
- html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background+.page__content .tabbar--top, /* if wrapped with a page with a toolbar */
- html[onsflag-iphonex-portrait] .tabbar--top__content .tabbar--top { /* if wrapped with a top tabbar */
- /* Restore original styles */
- padding-top: 0;
- }
-
- /* Outermost tabbar--top__content */
- html[onsflag-iphonex-portrait] .tabbar--top__content {
- top: calc(var(--iphonex-safe-area-inset-top-portrait) + var(--tabbar-height));
- }
- /* Non-outermost */
- html[onsflag-iphonex-portrait] .dialog .tabbar--top__content, /* if wrapped with dialogs */
- html[onsflag-iphonex-portrait] .toolbar:not(.toolbar--cover-content)+.page__background+.page__content .tabbar--top__content, /* if wrapped with a page with a toolbar */
- html[onsflag-iphonex-portrait] .tabbar--top__content .tabbar--top__content { /* if wrapped with a top tabbar */
- /* Restore original styles */
- top: var(--tabbar-height);
- }
-
- /* Outermost bottom tabbar */
- html[onsflag-iphonex-portrait] .tabbar:not(.tabbar--top):not(.tabbar--top) {
- padding-bottom: var(--iphonex-safe-area-inset-bottom-portrait);
- }
- /* Non-outermost */
- html[onsflag-iphonex-portrait] .dialog .tabbar:not(.tabbar--top):not(.tabbar--top), /* if wrapped with dialogs */
- html[onsflag-iphonex-portrait] .page-with-bottom-toolbar > .page__content .tabbar:not(.tabbar--top), /* if wrapped with a page with a bottom-bar */
- html[onsflag-iphonex-portrait] .tabbar__content:not(.tabbar--top__content) .tabbar:not(.tabbar--top) { /* if wrapped with a bottom tabbar */
- /* Restore original styles */
- padding-bottom: 0;
- }
-
- /* Outermost.tabbar__content:not(.tabbar--top__content) */
- html[onsflag-iphonex-portrait] .tabbar__content:not(.tabbar--top__content) {
- bottom: calc(var(--iphonex-safe-area-inset-bottom-portrait) + var(--tabbar-height));
- }
- /* Non-outermost */
- html[onsflag-iphonex-portrait] .dialog .tabbar__content:not(.tabbar--top__content), /* if wrapped with dialogs */
- html[onsflag-iphonex-portrait] .page-with-bottom-toolbar > .page__content .tabbar__content:not(.tabbar--top__content), /* if wrapped with a page with a bottom-bar */
- html[onsflag-iphonex-portrait] .tabbar__content:not(.tabbar--top__content) .tabbar__content:not(.tabbar--top__content) { /* if wrapped with a bottom tabbar */
- /* Restore original styles */
- bottom: var(--tabbar-height);
- }
- }
- @media (orientation: landscape) {
- /* Outermost bottom-bar */
- html[onsflag-iphonex-landscape] .bottom-bar {
- bottom: 0;
- box-sizing: content-box;
- padding-bottom: var(--iphonex-safe-area-inset-bottom-landscape);
- }
- /* Non-outermost */
- html[onsflag-iphonex-landscape] .dialog .bottom-bar, /* if wrapped with dialogs */
- html[onsflag-iphonex-landscape] .page-with-bottom-toolbar > .page__content .bottom-bar, /* if wrapped with a page with a bottom-bar */
- html[onsflag-iphonex-landscape] .tabbar__content:not(.tabbar--top__content) .bottom-bar { /* if wrapped with a bottom tabbar */
- /* Restore original styles */
- bottom: 0;
- box-sizing: border-box;
- padding-bottom: 0;
- }
-
- /* Outermost page__content without bottom-bars */
- html[onsflag-iphonex-landscape] .page__content {
- bottom: 0;
- padding-bottom: var(--iphonex-safe-area-inset-bottom-landscape);
- }
- /* Non-outermost */
- html[onsflag-iphonex-landscape] .dialog .page__content, /* if wrapped with dialogs */
- html[onsflag-iphonex-landscape] .page-with-bottom-toolbar > .page__content .page__content, /* if wrapped with a page with a bottom-bar */
- html[onsflag-iphonex-landscape] .tabbar__content:not(.tabbar--top__content) .page__content, /* if wrapped with a bottom tabbar */
- html[onsflag-iphonex-landscape] .page-with-bottom-toolbar > .page__content { /* if the page has a bottom-bar */
- /* Restore original styles */
- bottom: 0;
- padding-bottom: 0;
- }
-
- /* Outermost page__content with a bottom-bar */
- html[onsflag-iphonex-landscape] .page-with-bottom-toolbar > .page__content {
- bottom: calc(var(--iphonex-safe-area-inset-bottom-landscape) + var(--toolbar-height));
- padding-bottom: 0;
- }
- /* Non-outermost */
- html[onsflag-iphonex-landscape] .dialog .page-with-bottom-toolbar > .page__content, /* if wrapped with dialogs */
- html[onsflag-iphonex-landscape] .page-with-bottom-toolbar > .page__content .page-with-bottom-toolbar > .page__content, /* if wrapped with a page with a bottom-bar */
- html[onsflag-iphonex-landscape] .tabbar__content:not(.tabbar--top__content) .page-with-bottom-toolbar > .page__content { /* if wrapped with a bottom tabbar */
- /* Restore original styles */
- bottom: var(--toolbar-height);
- padding-bottom: 0;
- }
-
- /* Outermost bottom tabbar */
- html[onsflag-iphonex-landscape] .tabbar:not(.tabbar--top) {
- padding-bottom: var(--iphonex-safe-area-inset-bottom-landscape);
- }
- /* Non-outermost */
- html[onsflag-iphonex-landscape] .dialog .tabbar:not(.tabbar--top), /* if wrapped with dialogs */
- html[onsflag-iphonex-landscape] .page-with-bottom-toolbar > .page__content .tabbar:not(.tabbar--top), /* if wrapped with a page with a bottom-bar */
- html[onsflag-iphonex-landscape] .tabbar__content:not(.tabbar--top__content) .tabbar:not(.tabbar--top) { /* if wrapped with a bottom tabbar */
- /* Restore original styles */
- padding-bottom: 0;
- }
-
- /* Outermost.tabbar__content:not(.tabbar--top__content) */
- html[onsflag-iphonex-landscape] .tabbar__content:not(.tabbar--top__content) {
- bottom: calc(var(--iphonex-safe-area-inset-bottom-landscape) + var(--tabbar-height));
- }
- /* Non-outermost */
- html[onsflag-iphonex-landscape] .dialog .tabbar__content:not(.tabbar--top__content), /* if wrapped with dialogs */
- html[onsflag-iphonex-landscape] .page-with-bottom-toolbar > .page__content .tabbar__content:not(.tabbar--top__content), /* if wrapped with a page with a bottom-bar */
- html[onsflag-iphonex-landscape] .tabbar__content:not(.tabbar--top__content) .tabbar__content:not(.tabbar--top__content) { /* if wrapped with a bottom tabbar */
- /* Restore original styles */
- bottom: var(--tabbar-height);
- }
- }
-
- /* Lists in .page__content */
- @media (orientation: landscape) {
- /* Only patching lists just under .page__content */
- html[onsflag-iphonex-landscape] .page__content > .list:not(.list--inset) {
- margin-left: calc(- var(--iphonex-safe-area-inset-left-landscape));
- margin-right: calc(- var(--iphonex-safe-area-inset-right-landscape));
- }
-
- /* For left safe area */
- html[onsflag-iphonex-landscape] .page__content > .list:not(.list--inset) > .list-header {
- padding-left: calc(var(--iphonex-safe-area-inset-left-landscape) + 15px);
- }
- html[onsflag-iphonex-landscape] .page__content > .list:not(.list--inset) > .list-item {
- /* margin-left is not suitable for iPhone X patch. Using padding-left here. */
- padding-left: calc(var(--iphonex-safe-area-inset-left-landscape) + 14px);
- }
-
- /* For right safe area */
- html[onsflag-iphonex-landscape] .page__content > .list:not(.list--inset) > .list-item--chevron:before {
- right: calc(var(--iphonex-safe-area-inset-right-landscape) + 16px);
- }
- html[onsflag-iphonex-landscape] .page__content > .list:not(.list--inset) > .list-item > .list-item__center:last-child {
- padding-right: calc(var(--iphonex-safe-area-inset-right-landscape) + 6px);
- }
- html[onsflag-iphonex-landscape] .page__content > .list:not(.list--inset) > .list-item > .list-item__right {
- padding-right: calc(var(--iphonex-safe-area-inset-right-landscape) + 12px);
- }
- html[onsflag-iphonex-landscape] .page__content > .list:not(.list--inset) > .list-item > .list-item--chevron__right {
- padding-right: calc(var(--iphonex-safe-area-inset-right-landscape) + 30px);
- }
- }
- /* Lists in .page__content in dialogs and modals */
- @media (orientation: landscape) {
- /* Only patching lists just under .page__content */
- html[onsflag-iphonex-landscape] .dialog .page__content > .list:not(.list--inset) {
- margin-left: 0;
- margin-right: 0;
- }
-
- /* For left safe area */
- html[onsflag-iphonex-landscape] .dialog .page__content > .list:not(.list--inset) > .list-header {
- padding-left: 15px;
- }
- html[onsflag-iphonex-landscape] .dialog .page__content > .list:not(.list--inset) > .list-item {
- padding-left: 14px;
- }
-
- /* For right safe area */
- html[onsflag-iphonex-landscape] .dialog .page__content > .list:not(.list--inset) > .list-item--chevron:before {
- right: 16px;
- }
- html[onsflag-iphonex-landscape] .dialog .page__content > .list:not(.list--inset) > .list-item > .list-item__center:last-child {
- padding-right: 6px;
- }
- html[onsflag-iphonex-landscape] .dialog .page__content > .list:not(.list--inset) > .list-item > .list-item__right {
- padding-right: 12px;
- }
- html[onsflag-iphonex-landscape] .dialog .page__content > .list:not(.list--inset) > .list-item > .list-item--chevron__right {
- padding-right: 30px;
- }
- }
|