Skip to content

Commit

Permalink
[qa] Add css linting #85
Browse files Browse the repository at this point in the history
Closes #85
  • Loading branch information
devkapilbansal committed Mar 9, 2021
1 parent b591723 commit 11e1828
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
run: pip install -e .

- name: Install jslint
run: sudo npm install -g jslint
run: sudo npm install -g jslint stylelint

- name: QA checks
run: ./run-qa-checks
Expand Down
19 changes: 19 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"rules": {
"block-no-empty": null,
"color-no-invalid-hex": true,
"comment-empty-line-before": ["always", {
"ignore": ["stylelint-commands", "after-comment"]
}],
"declaration-colon-space-after": "always",
"indentation": [2, {
"except": ["value"]
}],
"max-empty-lines": 4,
"rule-empty-line-before": ["never-multi-line", {
"except": ["first-nested"],
"ignore": ["after-comment", "inside-block"]
}],
"unit-allowed-list": ["em", "rem", "%", "s", "px", "vh", "deg"]
}
}
15 changes: 4 additions & 11 deletions openwisp_ipam/static/openwisp-ipam/css/admin.css
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
.list-ip{
padding: 10px;
}

.subnet-visual{
margin: 10px 20px 0;
padding: 0;
}

section.subnet-visual{
overflow-anchor: none;
overflow-y: scroll;
height: 700px;
}

.subnet-visual a {
display: inline-block;
width: 120px;
Expand All @@ -26,24 +23,20 @@ section.subnet-visual{
font-weight: normal;
text-decoration: none !important;
}

.subnet-visual.ipv6 a {
font-size: 12px;
letter-spacing: -0.2px;
width: 240px;
padding: 8px 5px;
font-size: 12px;
letter-spacing: -0.2px;
width: 240px;
padding: 8px 5px;
}

.subnet-visual a:hover{
background: rgba(20, 102, 26, 1);
border: 1px solid rgba(0, 0, 0, 0.4);
}

.subnet-visual a.used{
background: rgba(149, 10, 10, 0.9);
border: 1px solid rgba(0, 0, 0, 0.2);
}

.subnet-visual a.used:hover{
background: rgba(149, 10, 10, 1);
border: 1px solid rgba(0, 0, 0, 0.4);
Expand Down
4 changes: 4 additions & 0 deletions run-qa-checks
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ echo ''
echo 'Check JavaScript Linting'
jslint ./openwisp_ipam/static/openwisp-ipam/js/*.js

echo ''
echo 'Check CSS Linting'
stylelint ./openwisp_ipam/static/openwisp-ipam/css/*.css

echo ''
echo 'Running checks for openwisp_ipam'

Expand Down

0 comments on commit 11e1828

Please sign in to comment.