{"id":200,"date":"2020-10-15T00:57:42","date_gmt":"2020-10-14T15:57:42","guid":{"rendered":"http:\/\/localhost:8000\/?p=200"},"modified":"2021-01-16T00:59:58","modified_gmt":"2021-01-15T15:59:58","slug":"vuetify-reset-css","status":"publish","type":"post","link":"http:\/\/localhost:8000\/2020\/10\/vuetify-reset-css.html","title":{"rendered":"Vuetify\u306e\u30ea\u30bb\u30c3\u30c8CSS\u306e\u5f71\u97ff\u7bc4\u56f2\u3092Vuetify\u9069\u7528\u7bc4\u56f2\u5185\u306b\u9650\u5b9a\u3059\u308b"},"content":{"rendered":"
Vuetify<\/a> \u306f\u3001\u3068\u3066\u3082\u4f7f\u3044\u3084\u3059\u3044Vue UI\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u63d0\u4f9b\u3057\u3066\u304f\u308c\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u306a\u306e\u3067\u3059\u304c\u3001\u30ea\u30bb\u30c3\u30c8CSS\u304c\u5f37\u5236\u7684\u306b\u30da\u30fc\u30b8\u5168\u4f53\u306b\u9069\u7528\u3055\u308c\u3066\u3057\u307e\u3046\u305f\u3081\u3001\u65e2\u5b58\u30da\u30fc\u30b8\u306e\u4e00\u90e8\u5206\u306bVuetify\u3092\u4f7f\u3044\u305f\u304f\u3066\u3082\u305d\u306e\u5916\u5074\u306e\u30c7\u30b6\u30a4\u30f3\u304c\u5d29\u308c\u3066\u3057\u307e\u3046\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n \u3053\u3053\u3067\u306f\u305d\u306e\u554f\u984c\u3092\u56de\u907f\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n \u30ea\u30bb\u30c3\u30c8CSS\u3068\u306f\u5404\u30d6\u30e9\u30a6\u30b6\u304c\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u9069\u7528\u3059\u308bCSS\u306e\u5dee\u7570\u306e\u5f71\u97ff\u3067\u753b\u9762\u306e\u30c7\u30b6\u30a4\u30f3\u304c\u5909\u308f\u3063\u3066\u3057\u307e\u308f\u306a\u3044\u69d8\u306b\u3001\u30d6\u30e9\u30a6\u30b6\u304c\u9069\u7528\u3059\u308bCSS\u3092\u6253\u3061\u6d88\u3059\u305f\u3081\u306e\u3082\u306e\u3089\u3057\u3044\u3067\u3059\u3002<\/p>\n Vuetify\u306e\u30ea\u30bb\u30c3\u30c8CSS\u306f\u4ee5\u4e0b\u3067\u3001\u3053\u308c\u304c\u5f37\u5236\u7684\u306b\u9069\u7528\u3055\u308c\u307e\u3059\u3002 \u4f8b\u3048\u3070\u3001\u4ee5\u4e0b\u306e\u69d8\u306a\u7d50\u69cb\u5f37\u70c8\u306a\u8a2d\u5b9a\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n \u3053\u3093\u306a\u306e\u304c\u3042\u308b\u3068Vuetify\u306e\u9069\u7528\u7bc4\u56f2\u306e\u5916\u5074\u306f\u3082\u3061\u308d\u3093\u5d29\u308c\u307e\u304f\u308a\u3067\u3059\u3002 \u3068\u3044\u3046\u308f\u3051\u3067\u3001\u65e2\u5b58\u30da\u30fc\u30b8\u306e\u4e00\u90e8\u306bVuetify\u3092\u9069\u7528\u3059\u308b\u5834\u5408\u306f\u3001\u5bfe\u7b56\u3092\u53d6\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u3053\u308c\u306b\u3088\u308a\u3001 Vuetify\u306e\u9069\u7528\u7bc4\u56f2\u306f \u30dd\u30a4\u30f3\u30c8\u3092\u66f8\u3044\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n \u6b63\u76f4\u3001Vuetify\u672c\u4f53\u3067\u5bfe\u5fdc\u3057\u3066\u6b32\u3057\u3044\u3068\u3053\u308d\u3067\u3059\u304c\u3001\u306a\u304b\u306a\u304b\u5bfe\u5fdc\u3057\u3066\u304f\u308c\u307e\u305b\u3093\u3002\u3069\u3046\u3084\u3089CDN\u3092\u5229\u7528\u3059\u308b\u30b1\u30fc\u30b9\u3082\u5408\u308f\u305b\u3066\u4e00\u5f8b\u306e\u5bfe\u5fdc\u3059\u308b\u306e\u304c\u96e3\u3057\u3044\u3063\u307d\u3044\u3067\u3059\u3002<\/p>\n \u3068\u306f\u3044\u3048\u3001\u672c\u5bfe\u5fdc\u3092\u884c\u3046\u3053\u3068\u3067\u3001\u81ea\u5206\u304c\u4f7f\u3063\u3066\u3044\u308b\u7bc4\u56f2\u3067\u306f\u7279\u306b\u554f\u984c\u306f\u306a\u304f\u306a\u308a\u307e\u3057\u305f\u306e\u3067\u3001\u307e\u3042\u826f\u3057\u3068\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":" Vuetify \u306f\u3001\u3068\u3066\u3082\u4f7f\u3044\u3084\u3059\u3044Vue UI\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u63d0\u4f9b\u3057\u3066\u304f\u308c\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u306a\u306e\u3067\u3059\u304c\u3001\u30ea\u30bb\u30c3\u30c8CSS\u304c\u5f37\u5236\u7684\u306b\u30da\u30fc\u30b8\u5168\u4f53\u306b\u9069\u7528\u3055\u308c\u3066\u3057\u307e\u3046\u305f\u3081\u3001\u65e2\u5b58\u30da\u30fc\u30b8\u306e\u4e00\u90e8\u5206\u306bVuetify\u3092\u4f7f\u3044\u305f\u304f\u3066\u3082\u305d\u306e\u5916\u5074\u306e\u30c7\u30b6\u30a4\u30f3\u304c\u5d29\u308c\u3066\u3057\u307e\u3046\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002 \u3053\u3053\u3067\u306f\u305d\u306e\u554f\u984c\u3092\u56de\u907f\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3057\u307e\u3059\u3002 \u30ea\u30bb\u30c3\u30c8CSS\u3068\u306f \u30ea\u30bb\u30c3\u30c8CSS\u3068\u306f\u5404\u30d6\u30e9\u30a6\u30b6\u304c\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u9069\u7528\u3059\u308bCSS\u306e\u5dee\u7570\u306e\u5f71\u97ff\u3067\u753b\u9762\u306e\u30c7\u30b6\u30a4\u30f3\u304c\u5909\u308f\u3063\u3066\u3057\u307e\u308f\u306a\u3044\u69d8\u306b\u3001\u30d6\u30e9\u30a6\u30b6\u304c\u9069\u7528\u3059\u308bCSS\u3092\u6253\u3061\u6d88\u3059\u305f\u3081\u306e\u3082\u306e\u3089\u3057\u3044\u3067\u3059\u3002 Vuetify\u306e\u30ea\u30bb\u30c3\u30c8CSS Vuetify\u306e\u30ea\u30bb\u30c3\u30c8CSS\u306f\u4ee5\u4e0b\u3067\u3001\u3053\u308c\u304c\u5f37\u5236\u7684\u306b\u9069\u7528\u3055\u308c\u307e\u3059\u3002 https:\/\/github.com\/vuetifyjs\/vuetify\/blob\/master\/packages\/vuetify\/src\/styles\/generic\/_reset.scss \u4f8b\u3048\u3070\u3001 <\/span>Continue Reading<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[21,22],"tags":[],"_links":{"self":[{"href":"http:\/\/localhost:8000\/wp-json\/wp\/v2\/posts\/200"}],"collection":[{"href":"http:\/\/localhost:8000\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/localhost:8000\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/localhost:8000\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/localhost:8000\/wp-json\/wp\/v2\/comments?post=200"}],"version-history":[{"count":1,"href":"http:\/\/localhost:8000\/wp-json\/wp\/v2\/posts\/200\/revisions"}],"predecessor-version":[{"id":201,"href":"http:\/\/localhost:8000\/wp-json\/wp\/v2\/posts\/200\/revisions\/201"}],"wp:attachment":[{"href":"http:\/\/localhost:8000\/wp-json\/wp\/v2\/media?parent=200"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/localhost:8000\/wp-json\/wp\/v2\/categories?post=200"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/localhost:8000\/wp-json\/wp\/v2\/tags?post=200"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}\u30ea\u30bb\u30c3\u30c8CSS\u3068\u306f<\/h2>\n
Vuetify\u306e\u30ea\u30bb\u30c3\u30c8CSS<\/h2>\n
\nhttps:\/\/github.com\/vuetifyjs\/vuetify\/blob\/master\/packages\/vuetify\/src\/styles\/generic\/_reset.scss<\/a><\/p>\nbutton,\ninput,\nselect,\ntextarea {\n background-color: transparent;\n border-style: none;\n}<\/code><\/pre>\n
\n\u3082\u3061\u308d\u3093\u56f0\u3063\u3066\u3044\u308b\u4eba\u3082\u591a\u304f github issue<\/a> \u3082\u4e0a\u304c\u3063\u3066\u3044\u307e\u3059\u304c\u3001\u672a\u3060\u89e3\u6c7a\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002<\/p>\n\u5bfe\u5fdc\u65b9\u6cd5<\/h2>\n
\n\u5177\u4f53\u7684\u306b\u306f\u3001webpack\u306eLoader\u306e
\nsass-loader->css-loader->style-loader
\n\u3068\u3044\u3046\u4e00\u9023\u306e\u51e6\u7406\u306b
\nsass-loader->postcss-loader<\/b>->css-loader->style-loader
\n\u306e\u69d8\u306b\u3001postcss<\/a>\u3067\u5168\u3066\u306eCSS\u30bb\u30ec\u30af\u30bf\u306e\u982d\u306b\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u56fa\u6709\u306e#id\u3092\u3064\u3051\u308b<\/b>\u3068\u3044\u3046\u51e6\u7406\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002
\n\u4f8b\u3048\u3070\u4ee5\u4e0b\u306e\u69d8\u306a\u30a4\u30e1\u30fc\u30b8\u3067\u3059\u3002<\/p>\n\/* \u5909\u66f4\u524d *\/\nbutton,\ninput, {\n border-style: none;\n}\n\n\/* \u5909\u66f4\u5f8c *\/\n#myapp button,\n#myapp input {\n border-style: none;\n}<\/code><\/pre>\n
#myapp<\/code>\u306e\u5916\u5074\u306e\u8981\u7d20\u306b\u306f\u4e00\u5207\u5f71\u97ff\u3092\u4e0e\u3048\u306a\u3044\u3053\u3068\u304c\u62c5\u4fdd\u3055\u308c\u307e\u3059\u3002<\/p>\n
\u5b9f\u88c5<\/h2>\n
\u30e9\u30a4\u30d6\u30e9\u30ea\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n
npm install postcss --save-dev\nnpm install postcss-loader --save-dev\nnpm install postcss-prefix-selector --save-dev\nnpm insatll autoprefixer --save-dev<\/code><\/pre>\n
App.vue<\/h3>\n
<v-app><\/code>\u3067\u56f2\u3080\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u305d\u306e\u89aa\u8981\u7d20\u306bid\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n
<template>\n <div id="myapp">\n <v-app>\n <!-- \u7701\u7565 -->\n <\/v-app>\n <\/div>\n<\/template><\/code><\/pre>\n
webpack.config.js<\/h3>\n
\n
\n
<style><\/code>\u3068\u3057\u3066DOM\u306b\u633f\u5165\u3059\u308b<\/li>\n<\/ol>\n<\/li>\n
postcss-prefix-selector<\/code>\u3092\u4f7f\u3063\u3066\u3001css\u30bb\u30ec\u30af\u30bf\u306e\u982d\u306b
#myapp<\/code>\u3092\u8ffd\u52a0\u3057\u3066\u3044\u308b\n
const prefixer = require('postcss-prefix-selector');\n\/\/ \u7701\u7565\n module: {\n rules: [\n {\n test: \/\\.(css|scss|sass)$\/,\n use: [\n 'vue-style-loader',\n 'css-loader',\n {\n loader: 'postcss-loader',\n options: {\n postcssOptions: {\n plugins: [\n prefixer({\n prefix: '#myapp',\n transform: (prefix, selector, prefixedSelector) => {\n if (selector.startsWith('html') || selector.startsWith('body')) {\n return prefix + selector.substring(4);\n }\n return prefixedSelector;\n }\n })\n ]\n }\n }\n },\n {\n loader: 'sass-loader',\n options: {\n \/\/ \u7701\u7565\n },\n },\n ],\n },\n ]\n }<\/code><\/pre>\n<\/li>\n<\/ul>\n
\u3055\u3044\u3054\u306b<\/h2>\n