[WordPress] 外掛分享: SASS Compiler

首頁外掛目錄 › SASS Compiler
WordPress 外掛 SASS Compiler 的封面圖片
10+
安裝啟用
尚無評分
4169 天前
最後更新
問題解決
WordPress 4.0+ v1.0 上架:2014-10-18

內容簡介

透過這個外掛,您可以從 WordPress 儀錶板中編寫 SASS 並編譯樣式表,同時也可以編輯您的變數。

閱讀文件

以與 CSS 相同的方式註冊和加載 SASS 樣式表。

`

wp_enqueue_style( ‘my-sass-handle’, ‘http://example.com/css/mystyle.scss’, $deps, $ver, $media );
`

使用 sass_configuration 過濾器來設置外掛程式。

外掛程式的設置是可選的,但如果您使用 CSS 框架,至少應該註冊您的變數。

設置 SASS 變數值:

`

sass_set( $variable, $value );
`

獲取 SASS 變數值:

`

sass_get( $variable );
`

您最有可能在您的主題的 functions.php 中使用這些功能。

此外掛程式使用 scssphp 編譯器。

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「SASS Compiler」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Write SASS, edit your variables and compile your stylesheet from your dashboard.
Read the documentation

Register and enqueue your SASS sheets the same way you would do for your CSS.
`

wp_enqueue_style( ‘my-sass-handle’, ‘http://example.com/css/mystyle.scss’, $deps, $ver, $media );
`

Configure the plugin with the sass_configuration filter.
Configuration of the plugin is optional, but you should at least register your variables if you are using a CSS framework.

Set a SASS variable value
`

sass_set( $variable, $value );
`

Get a SASS variable value
`

sass_get( $variable );
`

You will most likely use these functions in your theme’s functions.php.
The plugin uses the scssphp Compiler.

延伸相關外掛

文章
Filter
Mastodon