1.0.18 • Published 3 years ago

wusd-scss v1.0.18

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

wusd-scss

wusd-scss is a collection of SCSS Mixind and functions.

Getting start

npm install wusd-scss --save

Webpack

webpack scss loader option

{
  loader: 'sass-loader',
  options: {
    additionalData: `@import "wusd-scss";`
  },
}

install

Import scss to your core

Example:

@import 'wusd-scss';

Document

vars

PropertyDefaultDescript
$color#6634E2
$color_plain#f6f2ff
$color_primary#6634E2
$color_success#67C23A
$color_success_plain#e1f3d8
$color_warning#E6A23C
$color_warning_plain#faecd8
$color_danger#F56C6C
$color_danger_plain#fde2e2
$color_info#909399
$color_info_plain#e9e9eb
$default_btn_circlefalsebtn circle (values: false, true)
$default_btn_radius6pxbtn radius
$default_card_shadow1px 1px 5px 5px #f1f1f1card shadow
$default_card_radius12pxcard radius
$default_card_padding10pxcard padding
$default_card_bgc#fffcard background color
$default_form_item_label_width80pxform item label width

Mixins

mixins methods

btn

codepreview
@include btn((type: primary));avatar
@include btn((type: info));avatar
@include btn((type: success));avatar
@include btn((type: warning));avatar
@include btn((type: danger));avatar
@include btn((type: primary, plain: true));avatar

options:

PropertyDescriptDefaulttypeAllow
typecolor stylesprimarystringprimary, success, warning, danger, info
radiusbutton radius6pxpixel
plainplain btnfalseboolean
inlineinline boxfalseboolean

btn_press

@include btn_press();
PropertyDescriptDefaulttypeAllow
elepseudo elements typeafterstringafter, before
press_colormask color#ffffffcolor
opacitypress opacity0.3number

card

codepreview
@include card((radius: 10px))avatar

options:

PropertyDescriptDefaulttype
radiuscard radius12pxpixel
paddingbox padding10pxpixel

clearfix

Clear float box

@include clearfix;

cut_txt

codepreview
@include cut_txt(1);avatar
@include cut_txt(2);avatar

options:

PropertyDescriptDefaulttype
lineshow ellipsis when overflow1number

cell

<div class="cell">
    <div>label:</div>
	<div>value</div>
</div>
codepreview
@include cell((label_width: 80%))avatar

options:

PropertyDescriptDefaulttype
label_widthlabel width80pxpixel

form_item

<div class="form_item_panel">
  <div>userName: </div>
  <div><input type="text" /></div>
  <div class="icon">!</div>
</div>
codepreview
@include form_item((label_width: 120px));avatar

options:

PropertyDescriptDefaulttype
label_widthlabel width80pxpixel
alignvalue dom text alignleftstring
icon_widthicon width20pxpixel

flex

codepreview
@include flex((x: center, y: center));avatar

options:

PropertyDescriptDefaulttypeAllow
xjustify-contentleftstringstart, end, left, right, center, between, around, evenly
yalign-itemstopstringstart, end, top, center, bottom
dirflex-directionxstringx, y, rx, rystart, end,
wrapflex-wrapnonestringwrap
inlineinline flexfalsebooleantrue, false

flex_self

@include flex_self((grow: 1));
PropertyDescriptDefault
growflex-grownone
shrinkflex-shrinknone
basisflex-basisnone

safe_area_bottom

Adaptation of iPhone x Bang screen

@include safe_area_bottom;

safe_area_top

Adaptation of iPhone x home btn

@include safe_area_top;

un_select

prohibit select

@include un_select;
1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago