惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Jina AI
Jina AI
T
The Blog of Author Tim Ferriss
B
Blog
L
LangChain Blog
Y
Y Combinator Blog
美团技术团队
博客园 - 三生石上(FineUI控件)
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
G
Google Developers Blog
量子位
博客园_首页
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
C
Check Point Blog
D
Docker
小众软件
小众软件
The Cloudflare Blog
大猫的无限游戏
大猫的无限游戏
T
Tailwind CSS Blog
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 聂微东
Blog — PlanetScale
Blog — PlanetScale
GbyAI
GbyAI
Google DeepMind News
Google DeepMind News
IT之家
IT之家

Ember.js Blog

Ember 7.0 Released Announcing the Official TypeScript Types Public Preview Accessibility Working Group Update The 2020 Ember Roadmap Countdown to The New Year - Built-in Addons Countdown to The New Year - Ember Exam Countdown to The New Year - Ember Code Snippet Countdown to The New Year - Ember Changeset Countdown to The New Year - Ember In Viewport Countdown to The New Year - Ember CLI Update Countdown to The New Year - Ember Template Invocation Location Countdown to The New Year - Ember CLI TypeScript Countdown to The New Year - Ember Bootstrap and Ember Paper Countdown to The New Year - Ember CSS Modules Countdown to The New Year - Ember Mapbox GL Countdown to The New Year - Ember Shepherd Countdown to The New Year - Ember Template Lint Countdown to The New Year - Ember Composable Helpers Countdown to The New Year - Ember Leaflet Countdown to The New Year - Ember Intl Countdown to The New Year - Ember Test Selectors Countdown to The New Year - Ember Power Select Countdown to The New Year - Ember Simple Auth Countdown to The New Year - Ember SVG Jar Countdown to The New Year - Ember Page Title Countdown to The New Year- Ember A11Y Testing Countdown to The New Year - Ember Angle Brackets Codemod Countdown to The New Year - Ember Animated Countdown to The New Year - Ember Auto Import Countdown to The New Year - Ember Concurrency
Countdown to The New Year - Ember CLI Sass
2019-12-08 · via Ember.js Blog

– By Isaac Lee

This is the eighth in our DecEmber series–"Countdown to The New Year: 31 Days of Ember Addons". We plan to highlight a new addon each day until the new year, and we hope you'll join us for the fun!

Day 8

ember-cli-sass is an addon that I always install when I work on side projects. It's that amazing / critical / \<add your hype word of choice here>!

In all seriousness, let me tell you why I love Sass and why I encourage you to try out ember-cli-sass today.

What It Does

ember-cli-sass uses Sass to preprocess stylesheets in your Ember app (or addon). That's just a fancy way of saying you will have an easier time expressing how you want to style your app.

The addon also supports common, advanced use cases for Ember projects:

  • Source maps by default in development
  • Support for outputPaths configuration
  • Ability to specify includePaths
  • Ability to edit Sass in Chrome Dev Tools

Why I Like It

There are two areas to examine here: (1) why I love Sass, and (2) why I love ember-cli-sass.

Why I Love Sass

Sass (Syntactically Awesome Style Sheets), which builds on top of CSS, provides features that help increase my productivity as designer and developer.

My most favorite feature is nesting, which lets me practice BEM (Block, Element, Modifier). BEM helps me think carefully about how I write components and architect my app. It helps me envision how different components will interact with each other and how I might avoid leaking style.

PS. Variables are awesome too!

Why I Love Ember CLI Sass

ember-cli-sass is a great example of zero-config. In a new Ember app, all you need to do is run ember install ember-cli-sass, then change the file name app/styles/app.css to app/styles/app.scss. You also get live reload with no additional work!

Because there will be developers who are learning Sass for their first time, I believe zero-config is a must-have. When I was in a coding bootcamp, I wanted to try out Sass or Less for a group project. We ended up with plain CSS because we had limited time and had more important things to do than figuring out how to install and configure either. Without access to nesting or variables (i.e. a convention), we didn't have an easy time dividing work and collaborating with one another.

Conclusion

I think Sass is a great tool to help you think about how you want to architect your app. ember-cli-sass helps you try out Sass today!

I also encourage you to try out other tools for styling and discover what's best for your project. This could mean looking at a different framework such as Tailwind, localizing styles using ember-css-modules or ember-component-css, and finding a linter for stylesheets. I think we have made a good progress in bridging design and development, and am looking forward to what the future holds next.

Do you use ember-cli-sass? Or one like it? We'd love to hear about Ember addons that bring you joy!