Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
3a1bf9b2
Commit
3a1bf9b2
authored
Apr 29, 2020
by
Brandon Labuschagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Favour classnames over tag names
parent
a7298fff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
doc/development/fe_guide/style/scss.md
doc/development/fe_guide/style/scss.md
+18
-0
No files found.
doc/development/fe_guide/style/scss.md
View file @
3a1bf9b2
...
@@ -77,6 +77,24 @@ CSS classes should use the `lowercase-hyphenated` format rather than
...
@@ -77,6 +77,24 @@ CSS classes should use the `lowercase-hyphenated` format rather than
}
}
```
```
Class names should be used instead of tag name selectors.
Using tag name selectors are discouraged in CSS because
they can affect unintended elements in the hierarchy.
Also, since they are not meaningful names, they do not
add meaning to the code.
```
scss
// Bad
ul
{
color
:
#fff
;
}
// Good
.class-name
{
color
:
#fff
;
}
```
### Formatting
### Formatting
You should always use a space before a brace, braces should be on the same
You should always use a space before a brace, braces should be on the same
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment