Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// Tracking:
// https://github.com/alphagov/govuk-frontend/blob/master/src/helpers/_typography.scss
import {
FONT_STACK,
FONT_STACK_PRINT,
FONT_STACK_TABULAR,
FONT_WEIGHTS,
MEDIA_QUERIES,
TYPOGRAPHY_SCALE,
} from '@govuk-react/constants';
import { BLACK } from 'govuk-colours';
export const textColour = {
color: BLACK,
[MEDIA_QUERIES.PRINT]: {
color: '#000',
},
};
export const textColor = textColour;
export function common(fontFamily = FONT_STACK) {
return {
fontFamily,
WebkitFontSmoothing: 'antialiased',
MozOsxFontSmoothing: 'grayscale',
[MEDIA_QUERIES.PRINT]: {
fontFamily: FONT_STACK_PRINT,
},
};
}
':visited': {
color: LINK_COLOUR,
},
':hover': {
color: LINK_HOVER_COLOUR,
},
':active': {
color: LINK_ACTIVE_COLOUR,
},
':focus': {
color: FOCUS_TEXT_COLOUR,
},
};
export const printFriendly = {
[MEDIA_QUERIES.PRINT]: {
'&[href^="/"], &[href^="http://"], &[href^="https://"]': {
'&::after': {
content: '" (" attr(href) ")"',
fontSize: '90%',
wordWrap: 'break-word',
},
},
},
};