Verified Commit 931d3430 authored by Chocobozzz's avatar Chocobozzz
Browse files

Move to stylelint

parent 7d026caf
Pipeline #410588 passed with stages
in 14 minutes and 51 seconds
files:
include:
- "src/app/**/*.scss"
- "src/assets/**/*.scss"
- "src/sass/**/*.scss"
- "src/standalone/**/*.scss"
syntax:
include:
- scss
- sass
rules:
property-sort-order: 0
attribute-quotes: 0
border-zero: 0
no-color-keywords: 0
no-color-literals: 0
no-css-comments: 0
no-important: 0
no-trailing-zero: 1
space-after-bang: 1
space-before-bang: 1
space-after-colon: 1
space-before-colon: 1
clean-import-paths: 0
hex-length: 1
hex-notation: 0
nesting-depth:
- 1
- max-depth: 4
indentation: 2
{
"extends": "stylelint-config-sass-guidelines",
"rules": {
"scss/at-import-no-partial-leading-underscore": null,
"color-hex-case": null,
"color-hex-length": null,
"order/properties-alphabetical-order": null,
"selector-pseudo-element-no-unknown": [
true,
{
"ignorePseudoElements": [ "ng-deep" ]
}
],
"max-nesting-depth": [
8,
{
"ignore": [ "blockless-at-rules", "pseudo-classes" ]
}
],
"selector-max-compound-selectors": 9,
"selector-no-qualifying-type": null,
"scss/at-extend-no-missing-placeholder": null,
"number-leading-zero": null,
"rule-empty-line-before": null,
"selector-max-id": null,
"scss/at-function-pattern": null,
"function-parentheses-space-inside": "never-single-line"
}
}
......@@ -15,14 +15,14 @@
"scripts": {
"lint": "npm run lint-ts && npm run lint-scss",
"lint-ts": "tslint --project ./tsconfig.app.json -c ./tslint.json 'src/app/**/*.ts' 'src/standalone/**/*.ts'",
"lint-scss": "sass-lint -c .sass-lint.yml",
"lint-scss": "stylelint 'src/**/*.scss'",
"webpack": "webpack",
"tslint": "tslint",
"ng": "ng",
"webpack-bundle-analyzer": "webpack-bundle-analyzer",
"webdriver-manager": "webdriver-manager",
"ngx-extractor": "ngx-extractor",
"sass-lint": "sass-lint"
"stylelint": "stylelint"
},
"typings": "*.d.ts",
"resolutions": {
......@@ -106,13 +106,14 @@
"rxjs": "^6.5.2",
"sanitize-html": "^2.1.2",
"sass": "^1.29.0",
"sass-lint": "^1.13.1",
"sass-loader": "^10",
"sass-resources-loader": "^2.0.0",
"sha.js": "^2.4.11",
"socket.io-client": "^4.0.1",
"stream-browserify": "^3.0.0",
"stream-http": "^3.0.0",
"stylelint": "^13.13.0",
"stylelint-config-sass-guidelines": "^8.0.0",
"terser-webpack-plugin": "^4",
"ts-loader": "^8.0.14",
"tslib": "^2.0.0",
......
......@@ -21,7 +21,7 @@
{{ following }}
</a>
<button i18n class="showMore" *ngIf="!loadedAllFollowings && canLoadMoreFollowings()" (click)="loadAllFollowings()">Show full list</button>
<button i18n class="show-more" *ngIf="!loadedAllFollowings && canLoadMoreFollowings()" (click)="loadAllFollowings()">Show full list</button>
</div>
</div>
......@@ -17,9 +17,9 @@ a {
justify-content: flex-start;
}
.showMore {
.show-more {
@include peertube-button-link;
@include grey-button;
margin-top: 1%;
}
......@@ -63,7 +63,8 @@
position: relative;
&:hover, &:active {
&:hover,
&:active {
&::after {
content: '#';
display: inline-block;
......@@ -71,7 +72,8 @@
}
}
.middle-title, .section-title {
.middle-title,
.section-title {
display: inline-block;
}
......
......@@ -45,7 +45,8 @@
.p2p-privacy,
my-about-peertube-contributors {
::ng-deep {
p, li {
p,
li {
font-size: 15px;
}
}
......
......@@ -65,13 +65,13 @@
}
.description-html {
@include fade-text(30px, pvar(--channelBackgroundColor));
grid-column: 2 / 4;
grid-row: 2;
max-height: 80px;
font-size: 16px;
@include fade-text(30px, pvar(--channelBackgroundColor));
}
}
......
......@@ -40,7 +40,7 @@ my-user-moderation-dropdown,
}
.copy-button {
border: none;
border: 0;
}
.account-info {
......@@ -104,9 +104,9 @@ my-user-moderation-dropdown,
}
.description:not(.expanded) {
max-height: 70px;
@include fade-text(30px, pvar(--submenuBackgroundColor));
max-height: 70px;
}
.show-more {
......
......@@ -57,7 +57,7 @@ input[type=submit] {
display: flex;
margin-left: auto;
& + .form-error {
+ .form-error {
display: inline;
margin-left: 5px;
}
......@@ -84,7 +84,8 @@ textarea {
}
.disabled-checkbox-extra {
&, ::ng-deep label {
&,
::ng-deep label {
opacity: .5;
pointer-events: none;
}
......
......@@ -13,7 +13,8 @@ a {
@include disable-default-a-behaviour;
display: inline-block;
&, &:hover {
&,
&:hover {
color: pvar(--mainForegroundColor);
}
......
......@@ -5,7 +5,8 @@ a {
@include disable-default-a-behaviour;
display: inline-block;
&, &:hover {
&,
&:hover {
color: pvar(--mainForegroundColor);
}
......
@import "mixins";
@import 'mixins';
.form-sub-title {
flex-grow: 0;
......
......@@ -5,7 +5,8 @@ a {
@include disable-default-a-behaviour;
display: inline-block;
&, &:hover {
&,
&:hover {
color: pvar(--mainForegroundColor);
}
......
......@@ -4,4 +4,4 @@
.unblock-button {
@include peertube-button;
@include grey-button;
}
\ No newline at end of file
}
......@@ -49,7 +49,8 @@ my-global-icon {
max-height: 22px;
}
div, p {
div,
p {
@include ellipsis;
}
......
@import '_variables';
@import '_mixins';
.update-button[disabled="true"] ::ng-deep .action-button {
.update-button[disabled=true] ::ng-deep .action-button {
cursor: default !important;
}
......@@ -5,7 +5,8 @@ h2 {
margin-bottom: 20px;
}
input[type=submit], button {
input[type=submit],
button {
@include peertube-button;
@include orange-button;
......
......@@ -27,7 +27,7 @@
my-global-icon {
@include apply-svg-color(pvar(--greyForegroundColor));
&[iconName="npm"] {
&[iconName=npm] {
@include fill-svg-color(pvar(--greyForegroundColor));
}
}
......@@ -49,7 +49,7 @@
justify-content: space-between;
.description {
opacity: 0.8
opacity: 0.8;
}
}
......
......@@ -51,7 +51,7 @@ pre {
}
.job-error {
color: red;
color: #ff0000;
}
.badge {
......
......@@ -66,7 +66,7 @@
ng-select,
my-button {
width: 100% !important;
margin-left: 0px !important;
margin-left: 0 !important;
margin-bottom: 10px !important;
}
......@@ -85,7 +85,7 @@
ng-select,
my-button {
width: 100% !important;
margin-left: 0px !important;
margin-left: 0 !important;
margin-bottom: 10px !important;
}
......
......@@ -37,7 +37,8 @@ my-select-custom-value {
display: block;
}
input[type=submit], button {
input[type=submit],
button {
@include peertube-button;
@include orange-button;
......
......@@ -7,7 +7,7 @@ input:not([type=submit]):not([type=checkbox]) {
display: block;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
border-right: none;
border-right: 0;
}
input[type=submit] {
......
......@@ -24,7 +24,7 @@ tr.banned > td {
.user-table-primary-text .glyphicon {
font-size: 80%;
color: gray;
color: #808080;
margin-left: 0.1rem;
}
......
......@@ -33,7 +33,8 @@ input[type=email] {
}
}
.create-an-account, .forgot-password-button {
.create-an-account,
.forgot-password-button {
color: pvar(--mainForegroundColor);
cursor: pointer;
transition: opacity cubic-bezier(0.39, 0.575, 0.565, 1);
......@@ -49,7 +50,7 @@ input[type=email] {
justify-content: space-around;
flex-wrap: wrap;
& > div {
> div {
flex: 1 1;
}
......@@ -65,7 +66,8 @@ input[type=email] {
form {
margin: 0;
&, input {
&,
input {
width: 100%;
}
......@@ -82,7 +84,8 @@ input[type=email] {
color: var(--mainColor);
&:hover, &:active {
&:hover,
&:active {
color: var(--mainHoverColor);
}
}
......@@ -111,7 +114,7 @@ input[type=email] {
min-width: 100px;
&:hover {
background-color: rgba(209, 215, 224, 0.5)
background-color: rgba(209, 215, 224, 0.5);
}
}
}
......@@ -138,7 +141,7 @@ input[type=email] {
}
}
@mixin columnReverseDisplay {
@mixin column-reverse-display {
flex-direction: column-reverse;
.login-form-and-externals,
......@@ -168,14 +171,14 @@ input[type=email] {
@media screen and (max-width: breakpoint(md)) {
.wrapper {
@include columnReverseDisplay();
@include column-reverse-display();
}
}
@media screen and (max-width: breakpoint(md) + $menu-width) {
:host-context(.main-col:not(.expanded)) {
.wrapper {
@include columnReverseDisplay();
@include column-reverse-display();
}
}
}
......@@ -21,7 +21,7 @@ input[type=submit] {
display: flex;
margin-left: auto;
& + .form-error {
+ .form-error {
display: inline;
margin-left: 5px;
}
......
......@@ -32,7 +32,8 @@ my-user-notifications {
.header {
flex-direction: column;
& >:first-child, .peertube-select-container {
> :first-child,
.peertube-select-container {
margin-bottom: 15px;
}
......
......@@ -7,4 +7,4 @@
@include danger-button;
@include disable-outline;
}
}
\ No newline at end of file
}
......@@ -2,12 +2,12 @@
@import '_mixins';
.row {
@include sub-menu-h1;
flex-direction: column;
width: 100%;
& > my-top-menu-dropdown:nth-child(1) {
> my-top-menu-dropdown:nth-child(1) {
flex-grow: 1;
}
@include sub-menu-h1;
}
......@@ -66,7 +66,8 @@ textarea {
width: auto !important;
}
label[for=name] + div, textarea {
label[for=name] + div,
textarea {
width: 100%;
}
}
......@@ -83,7 +83,7 @@ input[type=text] {
margin: auto;
.video-channel-name {
margin-left: 0px !important;
margin-left: 0 !important;
}
}
}
......
......@@ -39,12 +39,12 @@
}
.delete-history {
grid-column: 4;
@include peertube-button;
@include grey-button;
@include button-with-icon;
grid-column: 4;
font-size: 15px;
}
}
......
......@@ -2,12 +2,12 @@
@import '_mixins';
.row {
@include sub-menu-h1;
flex-direction: column;
width: 100%;
& > my-top-menu-dropdown:nth-child(1) {
> my-top-menu-dropdown:nth-child(1) {
flex-grow: 1;
}
@include sub-menu-h1;
}
......@@ -13,15 +13,15 @@
display: inline-flex;
.video-table-video-image {
@include miniature-thumbnail;
$image-height: 45px;
@include miniature-thumbnail;
height: $image-height;
width: #{(16/9) * $image-height};
margin-right: 0.5rem;
border-radius: 2px;
border: none;
border: 0;
background: transparent;
display: inline-flex;
justify-content: center;
......@@ -60,7 +60,7 @@
div .glyphicon {
font-size: 80%;
color: gray;
color: #808080;
margin-left: 0.1rem;
}
......