joyent-portal/packages/ui-toolkit/src/text/headings.js

148 lines
3.1 KiB
JavaScript
Raw Normal View History

import styled from 'styled-components';
import { H1 as NH1 } from 'normalized-styled-components';
import remcalc from 'remcalc';
import is from 'styled-is';
export const H1 = styled(NH1)`
margin: 0;
font-family: ${props => props.theme.font.families};
color: ${props => props.theme.text};
font-size: ${remcalc(36)};
line-height: ${remcalc(45)};
font-style: normal;
2018-01-08 17:13:05 +02:00
font-stretch: normal;
2018-05-25 18:27:05 +03:00
font-weight: ${props => props.theme.font.weight.normal};
2018-04-06 17:53:44 +03:00
margin: 0;
${is('inline')`
display: inline-block;
`};
${is('small')`
font-size: ${remcalc(32)};
`};
${is('bold')`
font-weight: ${props => props.theme.font.weight.semibold};
`};
${is('white')`
-webkit-text-fill-color: currentcolor;
color: ${props => props.theme.white}
`};
`;
export const H2 = styled.h2`
margin: 0;
color: ${props => props.theme.text};
2018-05-25 18:27:05 +03:00
font-weight: ${props => props.theme.font.weight.normal};
line-height: ${remcalc(30)};
font-size: ${remcalc(24)};
${is('inline')`
display: inline-block;
`};
${is('small')`
font-size: ${remcalc(24)};
`};
${is('bold')`
font-weight: ${props => props.theme.font.weight.semibold};
`};
${is('white')`
-webkit-text-fill-color: currentcolor;
color: ${props => props.theme.white}
`};
`;
export const H3 = styled.h3`
margin: 0;
color: ${props => props.theme.text};
2018-05-25 18:27:05 +03:00
font-weight: ${props => props.theme.font.weight.normal};
line-height: ${remcalc(26)};
font-size: ${remcalc(21)};
${is('inline')`
display: inline-block;
`};
${is('small')`
font-size: ${remcalc(18)};
`};
${is('bold')`
font-weight: ${props => props.theme.font.weight.semibold};
`};
${is('white')`
-webkit-text-fill-color: currentcolor;
color: ${props => props.theme.white}
`};
`;
2017-09-26 19:07:45 +03:00
export const H4 = styled.h4`
margin: 0;
color: ${props => props.theme.text};
2018-04-06 17:53:44 +03:00
font-weight: ${props => props.theme.font.weight.normal};
line-height: ${remcalc(24)};
font-size: ${remcalc(15)};
${is('inline')`
display: inline-block;
`};
2018-05-23 19:29:04 +03:00
${is('bold')`
font-weight: ${props => props.theme.font.weight.semibold};
`};
${is('white')`
-webkit-text-fill-color: currentcolor;
color: ${props => props.theme.white}
`};
`;
export const H5 = styled.h4`
margin: 0;
color: ${props => props.theme.text};
2018-04-06 17:53:44 +03:00
font-weight: ${props => props.theme.font.weight.normal};
line-height: ${remcalc(24)};
font-size: ${remcalc(15)};
${is('inline')`
display: inline-block;
`};
${is('bold')`
font-weight: ${props => props.theme.font.weight.semibold};
`};
${is('white')`
-webkit-text-fill-color: currentcolor;
color: ${props => props.theme.white}
`};
`;
export const H6 = styled.h6`
margin: 0;
color: ${props => props.theme.text};
2018-04-06 17:53:44 +03:00
font-weight: ${props => props.theme.font.weight.normal};
line-height: ${remcalc(18)};
font-size: ${remcalc(13)};
${is('inline')`
display: inline-block;
`};
${is('bold')`
font-weight: ${props => props.theme.font.weight.semibold};
`};
${is('white')`
-webkit-text-fill-color: currentcolor;
color: ${props => props.theme.white}
`};
`;