休息了半年,最近要開始求職卻發現自己從來都沒有一個個人線上作品集。開始著手整理作品集,花短短的幾天弄了一個堪用的個人作品集網站,就心滿意足地去休息了。早上醒來發現自己的個人網站很不成熟,仔細地反省思考,整理了這段短短歷程的體悟。
我發現有許多前端工程師只把 sass 當作有變數、nested class 跟 & 的 CSS 來撰寫。
&
在 Sass 當中有許多好用的函式跟功能,如果不知道如何使用的話,對一個強大的預處理器來說,這是件相當可惜的事情。Sass3.5 的更新加強了對 css variable 的支持。
Sass3.5
在考慮使用 CSS in Javascript 或是引入 PostCSS 的 plugin 之前,先看看是否能夠用 Sass 達到同樣的目的吧!
ramda 是個相當好用的函式庫,如果聽過 lodash 或是 underscore 的話,可以將 ramda 想成 functional programming 的 lodash,他們的 API 有許多相似性,差別在於 ramda 本身有 FP 的功能,任何的 API 只要你沒有傳入參數,ramda 就會自動做 curry,這提供了相當大的彈性。