在 Rails 使用 custom font
參考 https://coderwall.com/p/v5c8kq/web-fonts-and-rails-asset-pipeline 把檔案放到 `app/assets/fonts` 裡面 然後在 `application.scss` 裡加上 ```scss @...
Using marked.js with hightlight.js in rails to provide github flavored markdown to github style html
In this example, I'll use webpacker to import highlight js and marked js and css file, you can use cdn as well. `app/javascripts/appli...
Import css from npm module in rails with webpacker
I use highlight.js In `app/javascripts/styles.js` ```js import 'highlight.js/styles/github.css'; ``` And then add to layout ```erb <...
sass override bootstrap var
$grid-columns: 24; $grid-gutter-width: 30px; $body-bg: #ffffff; $brand-primary: #394a5c; $brand-success: #87c599; 類似這樣,可以輕易的把 grid...
bootstrap include grid
有時候會想要做到 include column 到自定義的 css class 裡面,可以這樣做: ``` @import "bootstrap"; .app { @include make-row(); div { border: solid 1px...