Giter Site home page Giter Site logo

better-css-with-sass's People

Contributors

cole007 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

better-css-with-sass's Issues

“parent selector” is misleading

The term “parent selector” is misleading, especially for beginners. I recommend talking about a “reference to parent”, or something alike.

Fix

Find a more appropriate way to call “parent selector” to avoid any confusion.

Pages (to be completed)

  • 25
  • 26
  • 27
  • 28

Bad practice of using global variable in a mixin

Fix

Change:

$base-font-size: 16;
@mixin font-size($size) {
  font-size: $size + px;
  font-size: ($size / $base-font-size) + rem; }

Into:

@mixin font-size($size, $base-font-size: 16) {
  font-size: $size + px;
  font-size: ($size / $base-font-size) + rem; }

Pages

  • 40

Missing leading mixin example

Fix

Change:

$mixin mixin-name($variable) {
  output stuff here;
}

Into:

$mixin mixin-name($variable) {
  // output stuff here
}

Pages

  • 39

Bad practice of using underscore in place of hyphen

While both hyphens and underscores are strictly equivalent in Sass, it is considered a bit of a bad practice to use underscore in place of hyphens.

Fix

Change map_get into map-get. Funny thing is you use hyphen starting page 80.

Pages

  • 78
  • 79

incorrect nesting when explaining BEM

I think you are already aware of this one.

Fix

Change:

.article {
margin: 20px 0;
  &__image {
    width: 40%; }
  &--small {
    width: 20%; }}

Into:

.article {
margin: 20px 0;
  &__image {
    width: 40%;
    &--small {
      width: 20%; }}}

Pages

  • 30

Some content should be treated as code

Fix

I believe all of these should be wrapped code tags.

Pages (o be completed)

  • 15: “style.scss”
  • 15: “.scss”
  • 15: “cd”
  • 15: “.css”
  • 16: “style.css”
  • 16: “sass.css.map” (also see #5)
  • 16: “.scss” (2 times)
  • 16: “Ctrl”
  • 16: “c”
  • 16: “.css”
  • 17: “.scss”
  • 39: “em”
  • 40: “rem”
  • 58: “.scss”
  • 80: “$tone”
  • 80: “'base'”

Duplicated content in chapter 1

Fix

Remove second occurrence.

Pages

17 and 19.

So we’ve got Sass installed, we know how to convert Sass (or .scss) files into CSS, and we can use our existing CSS, which will process just fine into Sass. But where’s the fun in that? In the next chapter, I will start to look at some of the things we can do in Sass that we can’t do in CSS.

Missing modulo operator

Fix

Change “division (/) and subtraction (-)” into “division (/), subtraction (-) and modulo (%)”.

Pages

  • 39

Arguments should be parameters

Parameters are what's in a function signature. Arguments are what's being passed to a function call.

Fix

Change “(called arguments)” into “ (called parameters)”.

Pages (to be completed)

  • 39

Incorrect use of spaces

Fix

Add or remove spaces where needed.

Pages (to be completed)

  • 42: “(24/ $size)” -> “(24 / $size)
  • 51: “#{ index($pages, $item)}” -> “#{index($pages, $item)}
  • 51: “#{ $key}” -> “#{$key}
  • 74: “#{ $media}” -> “#{$media}
  • 76: “#{$property }” -> “#{$property}” (2 times)
  • 77: “background-color,$red” -> “background-color, $red
  • 77: “rgba (255, 0, 0, 0.75);” -> “rgba(255, 0, 0, 0.75);
  • 79: “$pages,news” -> “$pages, news” (3 times)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.