suomifi-ui-components
Version:
Suomi.fi UI component library
14 lines (10 loc) • 2.35 kB
JavaScript
'use strict';
var tslib = require('tslib');
var styled = require('styled-components');
var index = require('../../theme/reset/index.js');
var baseStyles = function baseStyles(theme) {
return styled.css(templateObject_1 || (templateObject_1 = tslib.__makeTemplateObject(["\n ", "\n ", "\n background-color: ", ";\n border-radius: inherit;\n position: relative;\n visibility: hidden;\n height: 0;\n overflow: hidden;\n word-break: break-word;\n transform-origin: top;\n\n &.fi-expander {\n display: block;\n }\n &:not(.fi-expander_content--no-padding) {\n padding: 0 ", ";\n }\n\n &.fi-expander_content--open {\n visibility: visible;\n height: auto;\n /* Add border-bottom to this class and remove it from parent element to prevent\n a scaling bug, where border-bottom sometimes disappears with Firefox */\n border-bottom: 1px solid ", ";\n /* Add border-top to prevent Safari/iOS browsers rendering subpixel top border */\n border-top: 1px solid transparent;\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n &:not(.fi-expander_content--no-padding) {\n padding: ", " ", " ", ";\n }\n }\n"], ["\n ", "\n ", "\n background-color: ", ";\n border-radius: inherit;\n position: relative;\n visibility: hidden;\n height: 0;\n overflow: hidden;\n word-break: break-word;\n transform-origin: top;\n\n &.fi-expander {\n display: block;\n }\n &:not(.fi-expander_content--no-padding) {\n padding: 0 ", ";\n }\n\n &.fi-expander_content--open {\n visibility: visible;\n height: auto;\n /* Add border-bottom to this class and remove it from parent element to prevent\n a scaling bug, where border-bottom sometimes disappears with Firefox */\n border-bottom: 1px solid ", ";\n /* Add border-top to prevent Safari/iOS browsers rendering subpixel top border */\n border-top: 1px solid transparent;\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n &:not(.fi-expander_content--no-padding) {\n padding: ", " ", " ", ";\n }\n }\n"])), index.element(theme), index.font(theme)('bodyText'), theme.colors.whiteBase, theme.spacing.insetXl, theme.colors.highlightBase, theme.spacing.xs, theme.spacing.m, theme.spacing.m);
};
var templateObject_1;
exports.baseStyles = baseStyles;
//# sourceMappingURL=ExpanderContent.baseStyles.js.map