import { jsx, jsxs, Fragment } from 'solid-jsx/jsx-runtime';

/*@jsxRuntime automatic @jsxImportSource solid-jsx*/
const toc = [];
function _createMdxContent(props) {
  const _components = Object.assign({
    p: "p",
    code: "code",
    pre: "pre",
    span: "span"
  }, props.components);
  return jsxs(Fragment, {
    children: [jsxs(_components.p, {
      children: ["Das ", jsx(_components.code, {
        children: "style"
      }), "-Attribut in Solid akzeptiert entweder Strings oder Objekte. Allerdings unterscheidet sich die Form des Objektes von ", jsx(_components.code, {
        children: "Element.prototype.style"
      }), " und ist stattdessen ein Wrapper für den Aufruf von ", jsx(_components.code, {
        children: "style.setProperty"
      }), ". Das heisst, dass die Attributnamen mit Bindestrichen geschrieben werden, also \"background-color\" statt \"backgroundColor\". Das bedeutet aber auch, dass wir die Möglichkeit haben, CSS-Variablen zu setzen:"]
    }), "\n", jsx(_components.pre, {
      children: jsxs(_components.code, {
        className: "hljs language-js",
        children: ["<div style={{ ", jsx(_components.span, {
          className: "hljs-string",
          children: "\"--my-custom-color\""
        }), ": ", jsx(_components.span, {
          className: "hljs-title function_",
          children: "themeColor"
        }), "() }} />\n"]
      })
    }), "\n", jsx(_components.p, {
      children: "Animieren wir unser Div mit ein paar Inline-Styles:"
    }), "\n", jsx(_components.pre, {
      children: jsxs(_components.code, {
        className: "hljs language-jsx",
        children: ["<div style={{\n  ", jsx(_components.span, {
          className: "hljs-attr",
          children: "color"
        }), ": ", jsxs(_components.span, {
          className: "hljs-string",
          children: ["`rgb(", jsx(_components.span, {
            className: "hljs-subst",
            children: "${num()}"
          }), ", 180, ", jsx(_components.span, {
            className: "hljs-subst",
            children: "${num()}"
          }), ")`"]
        }), ",\n  ", jsx(_components.span, {
          className: "hljs-string",
          children: "\"font-weight\""
        }), ": ", jsx(_components.span, {
          className: "hljs-number",
          children: "800"
        }), ",\n  ", jsx(_components.span, {
          className: "hljs-string",
          children: "\"font-size\""
        }), ": ", jsxs(_components.span, {
          className: "hljs-string",
          children: ["`", jsx(_components.span, {
            className: "hljs-subst",
            children: "${num()}"
          }), "px`"]
        }), "}}\n>\n  ", jsx(_components.span, {
          className: "hljs-title class_",
          children: "Some"
        }), " ", jsx(_components.span, {
          className: "hljs-title class_",
          children: "Text"
        }), "\n</div>\n"]
      })
    })]
  });
}
function MDXContent(props = {}) {
  const {wrapper: MDXLayout} = props.components || ({});
  return MDXLayout ? jsx(MDXLayout, Object.assign({}, props, {
    children: jsx(_createMdxContent, props)
  })) : _createMdxContent(props);
}

export { MDXContent as default, toc };
//# sourceMappingURL=lesson-78cdfdad.js.map
