Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sass / SCSS 預處理器 - @mixin 建立混入與 @include 載入混入 | Roya's Blog #65

Open
awdr74100 opened this issue May 31, 2020 · 0 comments

Comments

@awdr74100
Copy link
Owner

https://awdr74100.github.io/2020-05-30-scss-mixin-include/

傳統在撰寫樣式表上很常發生重工的現象,雖然說作用的對象是不同的,這指 CSS 選擇器作用的目標,但無法否認確實降低了我們的開發效率,最理想的做法應該是將會重用的樣式包裝成一個物件,每當有相同樣式的撰寫需求時,只需要取用這一個物件即可達到目的,而 Sass / SCSS 正好有提供像是 @mixin 的語句,用法就類似於 Vue.js 的 mixin,只不過將其撰寫內容更改為樣式而已,最後使用 @i

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant