UNPKG

@elastic/eui

Version:

Elastic UI Component Library

33 lines (32 loc) 1.95 kB
/* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License * 2.0 and the Server Side Public License, v 1; you may not use this file except * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ import { css } from '@emotion/react'; import { logicalCSS } from '../../global_styling'; import { highContrastModeStyles } from '../../global_styling/functions/high_contrast'; export var euiHorizontalRuleStyles = function euiHorizontalRuleStyles(euiThemeContext) { var euiTheme = euiThemeContext.euiTheme; return { euiHorizontalRule: /*#__PURE__*/css("border:none;", highContrastModeStyles(euiThemeContext, { none: "\n ".concat(logicalCSS('height', euiTheme.border.width.thin), "\n background-color: ").concat(euiTheme.border.color, ";\n "), // Windows high contrast themes ignore background colors forced: logicalCSS('border-bottom', euiTheme.border.thin) }), "flex-shrink:0;flex-grow:0;;label:euiHorizontalRule;"), // Sizes full: /*#__PURE__*/css(logicalCSS('width', '100%'), ";;label:full;"), half: /*#__PURE__*/css(logicalCSS('width', '50%'), " ", logicalCSS('margin-horizontal', 'auto'), ";;label:half;"), quarter: /*#__PURE__*/css(logicalCSS('width', '25%'), " ", logicalCSS('margin-horizontal', 'auto'), ";;label:quarter;"), // Margins none: '', xs: /*#__PURE__*/css("margin-block:", euiTheme.size.s, ";;label:xs;"), s: /*#__PURE__*/css("margin-block:", euiTheme.size.m, ";;label:s;"), m: /*#__PURE__*/css("margin-block:", euiTheme.size.base, ";;label:m;"), l: /*#__PURE__*/css("margin-block:", euiTheme.size.l, ";;label:l;"), xl: /*#__PURE__*/css("margin-block:", euiTheme.size.xl, ";;label:xl;"), xxl: /*#__PURE__*/css("margin-block:", euiTheme.size.xxl, ";;label:xxl;") }; };