Skip to content

Commit

Permalink
revert reset.less idea
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Sep 21, 2017
1 parent e69df89 commit f6254f2
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 71 deletions.
67 changes: 54 additions & 13 deletions components/style/core/base.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ html, body {
.square(100%);
}

* {
box-sizing: border-box;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0); // remove tap highlight color for mobile safari
}

*:before,
*:after {
box-sizing: border-box;
}

body {
font-family: @font-family;
font-size: @font-size-base;
Expand All @@ -21,22 +31,10 @@ button, input, select, textarea {
color: inherit;
}

ul,
ol {
list-style: none;
margin: 0;
padding: 0;
}

// Headers
h1, h2, h3, h4, h5, h6 {
color: @heading-color;
font-weight: 500;
margin: 0;
}

p {
margin: 0;
}

code,
Expand All @@ -46,4 +44,47 @@ samp {
font-family: @code-family;
}

.reset();
// Remove the clear button of a text input control in IE10+
input::-ms-clear, input::-ms-reveal {
display: none;
}

::selection {
background: @primary-color;
color: #fff;
}

// Links
a {
color: @link-color;
background: transparent;
text-decoration: @link-hover-decoration;
outline: none;
cursor: pointer;
transition: color .3s ease;

&:focus {
text-decoration: underline;
text-decoration-skip: ink;
}

&:hover {
color: @link-hover-color;
}

&:active {
color: @link-active-color;
}

&:active,
&:hover {
outline: 0;
text-decoration: none;
}

&[disabled] {
color: @disabled-color;
cursor: not-allowed;
pointer-events: none;
}
}
58 changes: 0 additions & 58 deletions components/style/mixins/reset.less
Original file line number Diff line number Diff line change
@@ -1,67 +1,9 @@
@import '../themes/default';

.reset() {
* {
box-sizing: border-box;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0); // remove tap highlight color for mobile safari
}

*:before,
*:after {
box-sizing: border-box;
}

// Remove the clear button of a text input control in IE10+
input::-ms-clear, input::-ms-reveal {
display: none;
}

::selection {
background: @primary-color;
color: #fff;
}

// Links
a {
color: @link-color;
background: transparent;
text-decoration: @link-hover-decoration;
outline: none;
cursor: pointer;
transition: color .3s ease;

&:focus {
text-decoration: underline;
text-decoration-skip: ink;
}

&:hover {
color: @link-hover-color;
}

&:active {
color: @link-active-color;
}

&:active,
&:hover {
outline: 0;
text-decoration: none;
}

&[disabled] {
color: @disabled-color;
cursor: not-allowed;
pointer-events: none;
}
}
}

.reset-component() {
font-family: @font-family;
font-size: @font-size-base;
line-height: @line-height-base;
color: @text-color;
box-sizing: border-box;
.reset;
}

0 comments on commit f6254f2

Please sign in to comment.