Bulmaãã«ã¹ã¿ãã¤ãºåæã§ã¡ãã£ã¨è§¦ã£ã¦ã¿ã
ã¯ããã«
Bulma*1ã¨ããCSSãã¬ã¼ã ã¯ã¼ã¯ãããã¾ãã
ã«ã¹ã¿ãã¤ãºåæã§ã¡ãã£ã¨è§¦ã£ã¦ã¿ã¾ããã
ç°å¢
- Windows 10 Pro
- Node.js v11.15.0
- Bulma 0.7.4
- node-sass 4.12.0
ã«ã¹ã¿ãã¤ãºã®åºæ¬ã«ã¤ãã¦ç解ãã
Customizeããå§ãã
Customizeããä¸ã¤é¸ãã§å§ãããã¨ã«ãã¾ãã
ä»åã¯With node-sassãé¸ã³ã¾ããã
bulma-startããå§ããã®ããããªã®ã§ããä»åã¯åå¼·ç®çãªã®ã§ãä¸ããä½ã£ã¦ããã£ã½ããããCustomizeããé¸ã³ã¾ããã
6. Add your own Bulma stylesãç解ãã
With node-sassã®æé 1ï½5ã¾ã§ã¯ç¹çãããã¨ã¯ããã¾ããã
ãã®ã¾ã¾ãã£ã¦ããã¾ãã
åé¡ã¯6. Add your own Bulma stylesã§ãã
ãããã«ã¹ã¿ãã¤ãºãè¡ãæé ãªã®ã§ããã3. Create a Sass fileã®Sass fileã¨6. Add your own Bulma stylesã®Sass fileãå
¨ãéããããçé¢ç®ã«èªè§£ããå¿
è¦ãããã¾ãã
以ä¸ã«6. Add your own Bulma stylesã®Sass fileãå¼ç¨ãã¾ãã
@charset "utf-8"; // Import a Google Font @import url('https://fonts.googleapis.com/css?family=Nunito:400,700'); // Set your brand colors $purple: #8A4D76; $pink: #FA7C91; $brown: #757763; $beige-light: #D0D1CD; $beige-lighter: #EFF0EB; // Update Bulma's global variables $family-sans-serif: "Nunito", sans-serif; $grey-dark: $brown; $grey-light: $beige-light; $primary: $purple; $link: $pink; $widescreen-enabled: false; $fullhd-enabled: false; // Update some of Bulma's component variables $body-background-color: $beige-lighter; $control-border-width: 2px; $input-border-color: transparent; $input-shadow: none; // Import only what you need from Bulma @import "../node_modules/bulma/sass/utilities/_all.sass"; @import "../node_modules/bulma/sass/base/_all.sass"; @import "../node_modules/bulma/sass/elements/button.sass"; @import "../node_modules/bulma/sass/elements/container.sass"; @import "../node_modules/bulma/sass/elements/form.sass"; @import "../node_modules/bulma/sass/elements/title.sass"; @import "../node_modules/bulma/sass/components/navbar.sass"; @import "../node_modules/bulma/sass/layout/hero.sass"; @import "../node_modules/bulma/sass/layout/section.sass";
以ä¸ã®ã«ã¹ã¿ãã¤ãºããã¦ããããã3. Create a Sass fileã¨æ¯ã¹ã¦6. Add your own Bulma stylesã®Sass fileã¯é·ããªã£ã¦ã¾ãã
- Variablesã§è§£èª¬ããã¦ããå¤æ°ã®å®ç¾©(Sass fileã®ã³ã¡ã³ãã®"Set your brand colors, Update Bulma's global variables", "Update some of Bulma's component variables"ã®é¨å)
(ã¡ãªã¿ã«ã³ã¡ã³ãã®"Import a Google Font"ã®é¨åã¯ãNunitoãã©ã³ãã使ãããã®å¸ç³) - Bulmaã«å«ã¾ããCSSã®ãã¡ä½¿ãé¨åã ãã®åãè¾¼ã¿(Sass fileã®ã³ã¡ã³ãã®"Import only what you need from Bulma"ã®é¨å)
Variablesã§è§£èª¬ããã¦ããå¤æ°ã®å®ç¾©ã ããããå ´å
@import ã§"../node_modules/bulma/bulma.sass"ãèªã¿è¾¼ãSass fileã«ããã°OKã§ãã
以ä¸ã«ä¾ã示ãã¾ãã
@charset "utf-8"; $family-sans-serif: Helvetica, "Arial", "Hiragino Kaku Gothic ProN",'ãã©ã®ãè§ã´ ProN W3', Meiryo, "ã¡ã¤ãªãª", sans-serif; @import "../node_modules/bulma/bulma.sass";
' `import "../node_modules/bulma/bulma.sass"; 'ããå¤æ°ã®å®ç¾©ããå¾ã«è¨è¼ããã®ã注æç¹ã§ãã
Sassã®ä»æ§ä¸ã¯ãããã¾ããªã®ã§ãããç§ã¯ç¥ããªãã¦ããã£ã¦ã¾ããã
ãããã«
ããã§ããã¨ã¯Variablesã®ãã¼ã¸ãç解ããã°ãã«ã¹ã¿ãã¤ãºãå¯è½ã«ãªãã¾ããã
ç§ã¯ã¾ã ç解ãã¦ãã¾ãããããããªã«æ°å¤ããªããã©ãã«ãã«ã¹ã¿ãã¤ãºã§ããããã«ãªãâ¦ãããªï¼
*1:Bulmaãä½ãªã®ãã¯ãCSSフレームワーク BULMA チュートリアル① - Qiitaã«ãããããã説æããã¦ãã¾ããç解ããããã®è¨äºã¨ãã¦ãå§ãã§ãã