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
15211a3b
Commit
15211a3b
authored
Jul 19, 2017
by
kushalpandya
Committed by
Toon Claes
Aug 21, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix typo, add SCSS guidelines
parent
b7c6302a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
2 deletions
+50
-2
doc/development/ee_features.md
doc/development/ee_features.md
+50
-2
No files found.
doc/development/ee_features.md
View file @
15211a3b
...
...
@@ -252,9 +252,9 @@ When doing this, rubocop might complain about the path not
matching. So on the top-level
`describe`
append
`# rubocop:disable
RSpec/FilePath`
to disable the cop for that line.
## J
S-code
## J
avaScript code in `assets/javascripts/`
To sep
e
rate EE-specific JS-files we can also move the files into an
`ee`
folder.
To sep
a
rate EE-specific JS-files we can also move the files into an
`ee`
folder.
For example there can be an
`app/assets/javascripts/protected_branches/protected_branches_bundle.js`
and an
...
...
@@ -275,3 +275,51 @@ view, using the `page_specific_javascript_bundle_tag` helper.
- content_for :page_specific_javascripts do
= page_specific_javascript_bundle_tag('protected_branches')
```
## SCSS code in `assets/stylesheets`
To separate EE-specific styles in SCSS files, we can adopt one of the two approaches.
### Moving styles into dedicated SCSS file
If a component you're adding styles for, is limited to only EE, it is better to have a
separate file in appropriate directory within
`assets/stylesheets`
such that the file will
only exist in EE codebase.
### Isolating EE-specific ruleset within SCSS file
There are situations where creating dedicated SCSS file is an overkill, for eg; a text style
of some component is different for EE. In such cases, styles are usually kept in stylesheet
that is common for both CE and EE, and it is wise to isolate such ruleset from rest of
CE rules (along with adding comment describing the same) to avoid conflicts during CE to EE merge.
#### Bad
```
scss
.section-body
{
.section-title
{
background
:
$gl-header-color
;
}
&
.ee-section-body
{
.section-title
{
background
:
$gl-header-color-cyan
;
}
}
}
```
#### Good
```
scss
.section-body
{
.section-title
{
background
:
$gl-header-color
;
}
}
/* EE-specific styles */
.section-body.ee-section-body
{
.section-title
{
background
:
$gl-header-color-cyan
;
}
}
```
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