Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
npm
/
glsx-components
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 46f2dc94
authored
Dec 28, 2021
by
luyt
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
add: 工具类scss margin padding 10-40px
1 parent
299740cf
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
91 additions
and
2 deletions
src/App.vue
src/packages/index.js
src/theme/theme.scss
src/theme/utils.scss
src/App.vue
View file @
46f2dc9
...
...
@@ -222,8 +222,8 @@ export default {
-moz-osx-font-smoothing
:
grayscale
;
text-align
:
center
;
color
:
#2c3e50
;
//
margin-top
:
60px
;
padding-top
:
60px
;
margin-top
:
60px
;
//
padding-top
:
60px
;
padding-bottom
:
50px
;
}
</
style
>
src/packages/index.js
View file @
46f2dc9
...
...
@@ -35,6 +35,7 @@
import
'@/plugins/element.js'
import
'@/theme/theme.scss'
// test 组件
import
TestComp
from
'./TestComp'
...
...
src/theme/theme.scss
View file @
46f2dc9
@import
'utils.scss'
;
$defaultColor
:
#5850ff
;
$lightColor
:
#7973ff
;
$dackColor
:
#4f48e6
;
...
...
src/theme/utils.scss
0 → 100644
View file @
46f2dc9
/**
scss 工具类添加
margin padding 10 20 30 40 px
demo:
.m-1 {
margin: 10px !important;
}
.ml-1 {
margin-left: 10px !important;
}
*/
$spacerscom
:
(
1
:
10px
,
2
:
20px
,
3
:
30px
,
4
:
40px
)
!
default
;
$utils
:()
!
default
;
$utils
:
map-merge
(
$map1
:
(
m
:
(
property
:
margin
,
values
:
$spacerscom
)
,
//
mx
:
(
//
property
:
margin-left
margin-right
,
//
values
:
$spacerscom
//
)
,
ml
:
(
property
:
margin-left
,
values
:
$spacerscom
)
,
mr
:
(
property
:
margin-right
,
values
:
$spacerscom
)
,
mt
:
(
property
:
margin-top
,
values
:
$spacerscom
)
,
mb
:
(
property
:
margin-bottom
,
values
:
$spacerscom
)
,
p
:
(
property
:
padding
,
values
:
$spacerscom
)
,
//
px
:
(
//
property
:
padding-left
padding-right
,
//
values
:
$spacerscom
//
)
,
pl
:
(
property
:
padding-left
,
values
:
$spacerscom
)
,
pr
:
(
property
:
padding-right
,
values
:
$spacerscom
)
,
pt
:
(
property
:
padding-top
,
values
:
$spacerscom
)
,
pb
:
(
property
:
padding-bottom
,
values
:
$spacerscom
)
)
,
$map2
:
$utils
);
@each
$key
,
$value
in
$utils
{
@debug
$key
;
$values
:
map-get
(
$map
:
$value
,
$key
:
values
);
@each
$sub-key
,
$sub-val
in
$values
{
$properties
:
map-get
(
$map
:
$value
,
$key
:
property
);
.
#{
$key
}
-
#{
$sub-key
}
{
@each
$property
in
$properties
{
#{
$property
}
:
$
sub-val
!
important
;
}
}
}
};
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment