mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
style(lint): fix lint errors and add !default flags
This commit is contained in:
@@ -1,8 +1,20 @@
|
||||
module SCSSLint
|
||||
# Reports the use of !important in properties.
|
||||
# Reports the use of !default at the end of variable declarations.
|
||||
class Linter::DefaultRule < Linter
|
||||
include LinterRegistry
|
||||
|
||||
def visit_each(node)
|
||||
return true
|
||||
end
|
||||
|
||||
def visit_function(node)
|
||||
return true
|
||||
end
|
||||
|
||||
def visit_mixin(node)
|
||||
return true
|
||||
end
|
||||
|
||||
def visit_variable(node)
|
||||
return if source_from_range(node.source_range).include?('!default')
|
||||
|
||||
|
||||
@@ -145,6 +145,7 @@ ion-picker-cmp {
|
||||
@include ltr() {
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
@include rtl() {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
@@ -154,6 +155,7 @@ ion-picker-cmp {
|
||||
@include ltr() {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
@include rtl() {
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Minimum width of the split-pane's side pane
|
||||
$split-pane-ios-side-min-width: $split-pane-side-min-width;
|
||||
$split-pane-ios-side-min-width: $split-pane-side-min-width !default;
|
||||
|
||||
/// @prop - Maximum width of the split-pane's side pane
|
||||
$split-pane-ios-side-max-width: $split-pane-side-max-width;
|
||||
$split-pane-ios-side-max-width: $split-pane-side-max-width !default;
|
||||
|
||||
/// @prop - Border style of the side pane
|
||||
$split-pane-ios-border: $hairlines-width solid $list-ios-border-color;
|
||||
$split-pane-ios-border: $hairlines-width solid $list-ios-border-color !default;
|
||||
|
||||
.split-pane-ios.split-pane-visible >.split-pane-side {
|
||||
min-width: $split-pane-ios-side-min-width;
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Minimum width of the split-pane's side pane
|
||||
$split-pane-md-side-min-width: $split-pane-side-min-width;
|
||||
$split-pane-md-side-min-width: $split-pane-side-min-width !default;
|
||||
|
||||
/// @prop - Maximum width of the split-pane's side pane
|
||||
$split-pane-md-side-max-width: $split-pane-side-max-width;
|
||||
$split-pane-md-side-max-width: $split-pane-side-max-width !default;
|
||||
|
||||
/// @prop - Border style of the side pane
|
||||
$split-pane-md-border: 1px solid $list-md-border-color;
|
||||
$split-pane-md-border: 1px solid $list-md-border-color !default;
|
||||
|
||||
.split-pane-md.split-pane-visible >.split-pane-side {
|
||||
min-width: $split-pane-md-side-min-width;
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Minimum width of the split-pane's side pane
|
||||
$split-pane-wp-side-min-width: $split-pane-side-min-width;
|
||||
$split-pane-wp-side-min-width: $split-pane-side-min-width !default;
|
||||
|
||||
/// @prop - Maximum width of the split-pane's side pane
|
||||
$split-pane-wp-side-max-width: $split-pane-side-max-width;
|
||||
$split-pane-wp-side-max-width: $split-pane-side-max-width !default;
|
||||
|
||||
/// @prop - Border style of the side pane
|
||||
$split-pane-wp-border: 1px solid $list-wp-border-color;
|
||||
$split-pane-wp-border: 1px solid $list-wp-border-color !default;
|
||||
|
||||
.split-pane-wp.split-pane-visible >.split-pane-side {
|
||||
min-width: $split-pane-wp-side-min-width;
|
||||
|
||||
@@ -13,7 +13,7 @@ $toolbar-order-ios: (
|
||||
buttons-end: 5,
|
||||
buttons-right: 6,
|
||||
menu-toggle-end: 7,
|
||||
);
|
||||
) !default;
|
||||
|
||||
/// @prop - Font size of the toolbar button
|
||||
$toolbar-ios-button-font-size: 1.7rem !default;
|
||||
|
||||
@@ -13,7 +13,7 @@ $toolbar-order-md: (
|
||||
buttons-end: 5,
|
||||
buttons-right: 6,
|
||||
menu-toggle-end: 7,
|
||||
);
|
||||
) !default;
|
||||
|
||||
/// @prop - Font size of the toolbar title
|
||||
$toolbar-md-title-font-size: 2rem !default;
|
||||
|
||||
@@ -13,7 +13,7 @@ $toolbar-order-wp: (
|
||||
buttons-end: 5,
|
||||
buttons-right: 6,
|
||||
menu-toggle-end: 7,
|
||||
);
|
||||
) !default;
|
||||
|
||||
// deprecated
|
||||
$toolbar-wp-title-padding: null !default;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@charset "UTF-8";
|
||||
$ionic-theme: "Dark";
|
||||
$ionic-theme: "Dark"; // scss-lint:disable DefaultRule
|
||||
@import "./version";
|
||||
@import "./license";
|
||||
@import "./ionic.theme.dark";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@charset "UTF-8";
|
||||
$ionic-theme: "Default";
|
||||
$ionic-theme: "Default"; // scss-lint:disable DefaultRule
|
||||
@import "./version";
|
||||
@import "./license";
|
||||
@import "./ionic.theme.default";
|
||||
|
||||
@@ -31,20 +31,20 @@ $hairlines-width: .55px !default;
|
||||
// --------------------------------------------------
|
||||
// Grouped by elements which would be siblings
|
||||
|
||||
$z-index-menu-overlay: 80;
|
||||
$z-index-overlay: 1000;
|
||||
$z-index-click-block: 99999;
|
||||
$z-index-menu-overlay: 80; // scss-lint:disable DefaultRule
|
||||
$z-index-overlay: 1000; // scss-lint:disable DefaultRule
|
||||
$z-index-click-block: 99999; // scss-lint:disable DefaultRule
|
||||
|
||||
$z-index-fixed-content: 999;
|
||||
$z-index-scroll-content: 1;
|
||||
$z-index-refresher: 0;
|
||||
$z-index-fixed-content: 999; // scss-lint:disable DefaultRule
|
||||
$z-index-scroll-content: 1; // scss-lint:disable DefaultRule
|
||||
$z-index-refresher: 0; // scss-lint:disable DefaultRule
|
||||
|
||||
$z-index-page-container: 0;
|
||||
$z-index-toolbar: 10;
|
||||
$z-index-toolbar-background: -1;
|
||||
$z-index-page-container: 0; // scss-lint:disable DefaultRule
|
||||
$z-index-toolbar: 10; // scss-lint:disable DefaultRule
|
||||
$z-index-toolbar-background: -1; // scss-lint:disable DefaultRule
|
||||
|
||||
$z-index-backdrop: 2;
|
||||
$z-index-overlay-wrapper: 10;
|
||||
$z-index-backdrop: 2; // scss-lint:disable DefaultRule
|
||||
$z-index-overlay-wrapper: 10; // scss-lint:disable DefaultRule
|
||||
|
||||
$z-index-item-options: 1;
|
||||
$z-index-item-divider: 100;
|
||||
$z-index-item-options: 1; // scss-lint:disable DefaultRule
|
||||
$z-index-item-divider: 100; // scss-lint:disable DefaultRule
|
||||
|
||||
Reference in New Issue
Block a user