UNPKG

framework7

Version:

Full featured mobile HTML framework for building iOS & Android apps

200 lines (190 loc) 4.93 kB
.ios { @import (multiple) '../../less/colors-ios.less'; @import (multiple) '../../less/vars-ios.less'; @duration: 400ms; .toolbar { height: @toolbarSize; font-size: 17px; background: @toolbarBg; bottom: 0; &:after { backface-visibility: hidden; } a.link { line-height: @toolbarSize; height: @toolbarSize; i + span, i + i, span + i, span + span { .ltr({ margin-left: 7px; }); .rtl({ margin-right: 7px; }); } } a.icon-only { min-height: @toolbarSize; display: flex; justify-content: center; align-items: center; margin: 0; min-width: 44px; } b { font-weight: 600; } &.no-hairline { .hairline-remove(top); } } .hairline-root('.toolbar', top, @toolbarBorderColor); .toolbar-inner { padding: 0 8px; } .tabbar, .tabbar-labels { color: @tabbarLinkColor; a { color: @tabbarLinkColor; } a.tab-link-active { color: @tabbarActiveLinkColor; } i.icon { height: 30px; } } .tabbar-labels { height: @tabbarLabelsSize; a.tab-link, a.link { padding-top: 4px; padding-bottom: 4px; i + span { margin: 0; } } .tabbar-label { letter-spacing: 0.01em; font-size: 10px; } } @media (min-width: 768px) { .tabbar, .tabbar-labels { .toolbar-inner { justify-content: center; } a.tab-link, a.link { width: auto; min-width: 105px; } } .tabbar-labels { height: @tabbarLabelsSizeTablet; .tabbar-label { font-size: 14px; } } } // Scrollable .tabbar-scrollable { .toolbar-inner { justify-content: flex-start; } a.tab-link, a.link { padding: 0 8px; } } // Relation with page .toolbar ~ * .page-content, .toolbar ~ .page-content { padding-bottom: @toolbarSize; } .tabbar-labels ~ * .page-content, .tabbar-labels ~ .page-content { padding-bottom: @tabbarLabelsSize; @media (min-width: 768px) { padding-bottom: @tabbarLabelsSizeTablet; } } // Transitions .toolbar-transitioning { transition-duration: @duration; } // Hidden .toolbar-hidden { transform: translate3d(0, 100%, 0); } // Dark Theme & when (@includeDarkTheme) { .theme-dark { .toolbar, .toolbar& { background: @toolbarBgDark; .hairline-color(top, @toolbarBorderColorDark); } } } .color-theme-loop({ .color-theme-@{colorThemeName} { .tabbar, .tabbar-labels, &.tabbar-labels, &.tabbar { a.tab-link-active { color: @colorThemeValue; } } } }); .color-loop({ .tabbar-labels.color-@{colorName}, .tabbar.color-@{colorName} { a.tab-link-active { color: @colorValue; } } }); .safe-areas({ .views, .view, .page, .popup, .panel, .login-screen { >.toolbar { height: ~"calc(@{toolbarSize} + constant(safe-area-inset-bottom))"; height: ~"calc(@{toolbarSize} + env(safe-area-inset-bottom))"; .toolbar-inner { height: auto; bottom: constant(safe-area-inset-bottom); bottom: env(safe-area-inset-bottom); } } >.tabbar-labels { height: ~"calc(@{tabbarLabelsSize} + constant(safe-area-inset-bottom))"; height: ~"calc(@{tabbarLabelsSize} + env(safe-area-inset-bottom))"; } @media (min-width: 768px) { >.tabbar-labels { height: ~"calc(@{tabbarLabelsSizeTablet} + constant(safe-area-inset-bottom))"; height: ~"calc(@{tabbarLabelsSizeTablet} + env(safe-area-inset-bottom))"; } } } // Relation with page .toolbar ~ * .page-content, .toolbar ~ .page-content { padding-bottom: ~"calc(@{toolbarSize} + constant(safe-area-inset-bottom))"; padding-bottom: ~"calc(@{toolbarSize} + env(safe-area-inset-bottom))"; } .tabbar-labels ~ * .page-content, .tabbar-labels ~ .page-content { padding-bottom: ~"calc(@{tabbarLabelsSize} + constant(safe-area-inset-bottom))"; padding-bottom: ~"calc(@{tabbarLabelsSize} + env(safe-area-inset-bottom))"; @media (min-width: 768px) { padding-bottom: ~"calc(@{tabbarLabelsSizeTablet} + constant(safe-area-inset-bottom))"; padding-bottom: ~"calc(@{tabbarLabelsSizeTablet} + env(safe-area-inset-bottom))"; } } }); .safe-areas-landscape({ .safe-area-left({ .toolbar-inner { padding-left: ~"calc(8px + constant(safe-area-inset-left))"; padding-left: ~"calc(8px + env(safe-area-inset-left))"; } }); .safe-area-right({ .toolbar-inner { padding-right: ~"calc(8px + constant(safe-area-inset-right))"; padding-right: ~"calc(8px + env(safe-area-inset-right))"; } }); }); }