Skip to content

Many changes #5

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ Always strive for specificity over brevity. The more specific our class selector

### Syntax

We use the SCSS flavor of SASS to preprocess our CSS.
We use the SCSS flavor of SASS to preprocess our CSS. You might want to use [scss-lint](https://github.com/brigade/scss-lint) with the configuration provided in this repository.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@spicymagpie Depending on platform, https://github.com/sasstools/sass-lint is usually a better choice since it supports Sass & SCSS syntax and leverages LibSass which is signifcantly much faster accordingly.

Accordingly, it's often seen as a better choice, but there's nothing wrong with naming both—with it likely being the first one listed instead of this one or a Ruby Sass - LibSass distinction.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @lozandier, thanks for the suggestion! Frankly, I don't even know if this PR is still valid for what has been done.


### Naming Conventions

We use the BEM (block__element--modifier) syntax to name class selectors. Avoid applying styles to IDs and targeting descendant selectors. We use hypens to separate two words in the same name space, not camelCasing. We should avoid copying or mimic-ing JavaScript syntax for styling, as it can be confusing.
We use the BEM (block__element--modifier) syntax to name class selectors. Avoid applying styles to IDs and targeting descendant selectors. We use hyphens to separate two words in the same name space. We should avoid copying or mimic-ing JavaScript syntax for styling, as it can be confusing.

```html
<div class="dashboard">
<h1 class="dashboard__header"></h1>
</div>
```

If a specific style is re-used on more than 3 different views or files in our app, consider making a utility class for it. Utility classes should begin with or be prepended by `u-`.
If a specific style is re-used on more than 3 different views or files in our app, consider making a utility class for it. Utility classes should begin with or be prepended by `u-`.

A utility class selector looks like:

Expand All @@ -32,7 +32,7 @@ A utility class selector looks like:

### Spacing

Using proper spacing is important for writing readable code. Something to remember: "Would you write an email without any spacing?"
Using proper spacing is important for writing readable code. Something to remember: "Would you write an email without any spacing?". We use two spaces for indenting both HTML and CSS, in CSS we leave one space between the selector and the opening bracket, one space before the CSS value and one space on each side of an operator.

The right way:

Expand All @@ -41,26 +41,26 @@ The right way:
box-sizing: border-box;
display: block;
width: $width;
height: $height;
height: $height;
}

.block__element--modifier {
height: calc($height / 2);
height: calc($height / 2);
}

```

The wrong way:
The wrong way:

```css
.block__element{
box-sizing:border-box;
display:block;
width:$width;
height:$height;
height:$height;
}
.block__element--modifier{
height:calc($height / 2);
height:calc($height/2);
}

```
Expand All @@ -80,7 +80,7 @@ An example:
box-sizing: border-box;
display: block;
width: $width;
height: $height;
height: $height;
margin: 0 auto;
padding: 0;

Expand Down Expand Up @@ -114,7 +114,7 @@ background: url("images/bg.jpeg");

### Units of Measure

Use pixels for font-sizes and whole integers for letter-spacing.
Use pixels for font-sizes and whole decimals for letter-spacing.

```css
font-size: 16px;
Expand Down Expand Up @@ -143,7 +143,7 @@ $color-yellow: rgb(255,199,0);

### Images

For non-transparent images use the JPEG format when possible. For non-decorative images, images that a user may depend on for understanding content, etc., use the HTML <img> tag or inline images and _not_ the `background-image` property in your CSS.
For non-transparent images use the JPEG format when possible. For content-related (e.g. non-decorative) images, images that a user may depend on for understanding content, etc., use the HTML <img> tag and _not_ the `background-image` property in your CSS.

## Additional Resources

Expand Down