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: ["Solid の ", jsx(_components.code, {
        children: "style"
      }), " 属性は、スタイルの文字列かオブジェクトのどちらかを受け付けます。\nただし、オブジェクトの形式は ", jsx(_components.code, {
        children: "Element.prototype.style"
      }), " とは異なり、代わりに ", jsx(_components.code, {
        children: "style.setProperty"
      }), " を呼び出すためのラッパーとなります。これは、キーが \"backgroundColor \"ではなく \"background-color \"のようにダッシュケース形式をとり、単位は明示的に指定する必要がある（例: ", jsx(_components.code, {
        children: "width: 500"
      }), " ではなく ", jsx(_components.code, {
        children: "width: 500px"
      }), "）ということです。"]
    }), "\n", jsx(_components.p, {
      children: "これは CSS 変数を設定できるということでもあります:"
    }), "\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: "それでは、いくつかのインラインスタイルを使って、div をアニメーションしてみましょう:"
    }), "\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-07f8e170.js.map
