Summary Files Commits Branches @commit @diff @stats
path: root / src / mixins.less
diff options
context:
space:
mode:
Commita8ba146553cdbe25c782aea323a8f7df0ad664f0 (patch)
Author
 Yan Zhu <picturepan2@hotmail.com>
2017-08-15 16:06:33 +0800
Committer
 Yan Zhu <picturepan2@hotmail.com>
2017-08-15 16:06:33 +0800
Filese5383338e34ed9fcefa1fdafdb91346cf0e5d82f /src/mixins.less
Spectre-Dark-Gruvbox-a8ba146553cdbe25c782aea323a8f7df0ad664f0.tar
Spectre-Dark-Gruvbox-a8ba146553cdbe25c782aea323a8f7df0ad664f0.tar.gz
Spectre-Dark-Gruvbox-a8ba146553cdbe25c782aea323a8f7df0ad664f0.zip
Parent38962f94d497a40435862d187f30b04f2b68205d (diff)
IMPORTANT: Change back to rem unit, and default html font size is 20px.
1 files changed, 55 insertions, 2 deletions
-rw-r--r--src/mixins.less57
diff --git a/src/mixins.less b/src/mixins.less
index 9e8c0d7..52cd743 100644
--- a/src/mixins.less
+++ b/src/mixins.less
@@ -17,7 +17,7 @@
// Component focus shadow
.control-shadow(@color: @primary-color) {
- box-shadow: 0 0 0 2px fade(@color, 20%);
+ box-shadow: 0 0 0 .1rem fade(@color, 20%);
}
// Component transition
@@ -47,7 +47,60 @@
// Shadow mixin
.shadow-variant(@offset) {
- box-shadow: 0 @offset (@offset+1px)*2 fade(@dark-color, 30%);
+ box-shadow: 0 @offset (@offset + .05rem) * 2 fade(@dark-color, 30%);
+}
+
+// Position utility mixin
+.margin-variant(@size: 1) {
+ .m-@{size} {
+ padding: @size * @unit-1;
+ }
+ .mb-@{size} {
+ padding-bottom: @size * @unit-1;
+ }
+ .ml-@{size} {
+ padding-left: @size * @unit-1;
+ }
+ .mr-@{size} {
+ padding-right: @size * @unit-1;
+ }
+ .mt-@{size} {
+ padding-top: @size * @unit-1;
+ }
+ .mx-@{size} {
+ padding-left: @size * @unit-1;
+ padding-right: @size * @unit-1;
+ }
+ .my-@{size} {
+ padding-bottom: @size * @unit-1;
+ padding-top: @size * @unit-1;
+ }
+}
+
+.padding-variant(@size: 1) {
+ .p-@{size} {
+ padding: @size * @unit-1;
+ }
+ .pb-@{size} {
+ padding-bottom: @size * @unit-1;
+ }
+ .pl-@{size} {
+ padding-left: @size * @unit-1;
+ }
+ .pr-@{size} {
+ padding-right: @size * @unit-1;
+ }
+ .pt-@{size} {
+ padding-top: @size * @unit-1;
+ }
+ .px-@{size} {
+ padding-left: @size * @unit-1;
+ padding-right: @size * @unit-1;
+ }
+ .py-@{size} {
+ padding-bottom: @size * @unit-1;
+ padding-top: @size * @unit-1;
+ }
}
// Colors mixin