!(function (e) { var n = '(?:' + [ '[a-zA-Z_\\x80-\\uFFFF][\\w\\x80-\\uFFFF]*', '-?(?:\\.\\d+|\\d+(?:\\.\\d*)?)', '"[^"\\\\]*(?:\\\\[^][^"\\\\]*)*"', '<(?:[^<>]|(?!\x3c!--)<(?:[^<>"\']|"[^"]*"|\'[^\']*\')+>|\x3c!--(?:[^-]|-(?!->))*--\x3e)*>', ].join('|') + ')', a = { markup: { pattern: /(^<)[\s\S]+(?=>$)/, lookbehind: !0, alias: ['language-markup', 'language-html', 'language-xml'], inside: e.languages.markup, }, }; function r(e, a) { return RegExp( e.replace(//g, function () { return n; }), a ); } (e.languages.dot = { comment: { pattern: /\/\/.*|\/\*[\s\S]*?\*\/|^#.*/m, greedy: !0 }, 'graph-name': { pattern: r('(\\b(?:digraph|graph|subgraph)[ \t\r\n]+)', 'i'), lookbehind: !0, greedy: !0, alias: 'class-name', inside: a, }, 'attr-value': { pattern: r('(=[ \t\r\n]*)'), lookbehind: !0, greedy: !0, inside: a, }, 'attr-name': { pattern: r('([\\[;, \t\r\n])(?=[ \t\r\n]*=)'), lookbehind: !0, greedy: !0, inside: a, }, keyword: /\b(?:digraph|edge|graph|node|strict|subgraph)\b/i, 'compass-point': { pattern: /(:[ \t\r\n]*)(?:[ewc_]|[ns][ew]?)(?![\w\x80-\uFFFF])/, lookbehind: !0, alias: 'builtin', }, node: { pattern: r('(^|[^-.\\w\\x80-\\uFFFF\\\\])'), lookbehind: !0, greedy: !0, inside: a, }, operator: /[=:]|-[->]/, punctuation: /[\[\]{};,]/, }), (e.languages.gv = e.languages.dot); })(Prism); e/src/styles/abstracts/functions/_convert.scss?h=v1.1.0&id=1e982fb02a9967e0efdc76c93a44798a9f2dcb43'>treecommitdiffstats
blob: 9f51dc7c3921646c72c362065de96041ed03b5ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
@use "sass:math";

/// Convert px to rem or em.
/// @param  {Number} $px Value in px
/// @param  {String} $to Unit. Either "rem" or "em"
/// @param  {Number} $standard 1rem (or 1em) = 16px
/// @return {Number} Value in rem or em
@function convert-px($px, $to: "rem", $standard: 16) {
  @if $to == "rem" {
    @return math.div($px, $standard) + 0rem; // stylelint-disable-line
  } @else if $to == "em" {
    @return math.div($px, $standard) + 0em; // stylelint-disable-line
  } @else {
    @error "`$to` must be either `rem` or `em`.";
  }
}