@atlaskit/editor-common
Version:
A package that contains common classes and components for editor and renderer
32 lines (31 loc) • 1.7 kB
JavaScript
/* eslint-disable @atlaskit/ui-styling-standard/no-exported-styles */
/* eslint-disable @atlaskit/design-system/use-tokens-typography */
/* eslint-disable @atlaskit/ui-styling-standard/no-unsafe-values */
/* eslint-disable @atlaskit/ui-styling-standard/no-imported-style-values */
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
import { css } from '@emotion/react';
import { akEditorLineHeight, blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
import { fg } from '@atlaskit/platform-feature-flags';
import editorUGCToken from '../../ugc-tokens/get-editor-ugc-token';
// @see typography spreadsheet: https://docs.google.com/spreadsheets/d/1iYusRGCT4PoPfvxbJ8NrgjtfFgXLm5lpDWXzjua1W2E/edit#gid=93913128
export var paragraphSharedStyles = function paragraphSharedStyles(typographyTheme) {
return fg('platform_editor_typography_ugc') ? css({
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
'& p': {
font: editorUGCToken('editor.font.body', typographyTheme),
marginTop: blockNodesVerticalMargin,
marginBottom: 0
}
}) : css({
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
'& p': {
fontSize: '1em',
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
lineHeight: akEditorLineHeight,
fontWeight: "var(--ds-font-weight-regular, 400)",
marginTop: blockNodesVerticalMargin,
marginBottom: 0,
letterSpacing: '-0.005em'
}
});
};