Prop Class
Lismでは、主要なCSSプロパティ群に対して、それらで頻繁に使用される値やトークンを手軽にセットできるようなユーティリティクラスを用意しています。
さらに、その中でも特に重要なCSSプロパティについてはブレイクポイント指定用クラスも用意しています。
それらを Prop Class と呼んでおり、-{prop}(:{value}), -{prop}_{bp} という形式で定義しています。
このページでは、その Prop Classの一覧を紹介します。
SCSSでカスタマイズすることで、出力するクラスの種類は変更できます。
このページの表の見方
Section titled “このページの表の見方”ここからはテーブル形式で、各プロパティの情報をまとめていきます。
| カラム名 | 説明 |
|---|---|
| Property | CSSプロパティ |
| Shorthand | その省略形。Propクラスの-{prop}:{val}の{prop}にあたる文字列です。また、Lismコンポーネントに指定するためのプロパティ名もこの文字列です。 |
| To Class | Prop Utility クラスとして出力される値 |
| BP | ブレイクポイント対応クラス(-{prop}_{bp})サポートの有無 |
省略形の文字列(Shorthand)は、クラスとして出力されます。また、Lismコンポーネントに指定するプロパティも、この文字列です。
Typography
Section titled “Typography”| Property | Shorthand | To Class | BP |
|---|---|---|---|
font | f | inherit | - |
font-size | fz | FZ | ○ |
font-family | ff | FF | - |
font-weight | fw | FW | - |
font-style | fs | italic | - |
line-height | lh | LH, 1 | - |
letter-spacing | lts | LTS | - |
text-align | ta | centerleftright | - |
text-decoration | td | none | - |
text-transform | tt | upperlower | - |
↓
Examples
Example text
<p class='-fz:xl -fw:bold -lts:l -ta:center -tt:upper'>Example text</p>Colors
Section titled “Colors”| Property | Shorthand | To Class | BP |
|---|---|---|---|
color | c | brand,accenttext,text-2,base,inherittransparent | - |
background-color | bgc | brand,accentbase,base-2,text,inherittransparent | - |
--bdc | bdc | brand,accentline,inherit,transparent | - |
↓
Examples
Example text
<p class='-c:brand -bgc:base-2 -bd -p:30'>Example text</p>関連トークン: COLOR
Spacing
Section titled “Spacing”Padding
Section titled “Padding”| Property | Shorthand | To Class | BP |
|---|---|---|---|
padding | p | SPACE | ○ |
padding-inline | px | SPACE | ○ |
padding-block | py | SPACE | ○ |
padding-inline-start | px-s | - | ○ |
padding-inline-end | px-e | - | ○ |
padding-block-start | py-s | - | ○ |
padding-block-end | py-e | - | ○ |
padding-left | pl | - | ○ |
padding-right | pr | - | ○ |
padding-top | pt | - | ○ |
padding-bottom | pb | - | ○ |
Margin
Section titled “Margin”| Property | Shorthand | To Class | BP |
|---|---|---|---|
margin | m | auto, SPACE | ○ |
margin-inline | mx | auto, SPACE | ○ |
margin-block | my | auto, SPACE | ○ |
margin-inline-start | mx-s | auto | ○ |
margin-inline-end | mx-e | auto | ○ |
margin-block-start | my-s | auto, SPACE | ○ |
margin-block-end | my-e | auto | ○ |
margin-left | ml | auto | ○ |
margin-right | mr | auto | ○ |
margin-top | mt | auto | ○ |
margin-bottom | mb | auto | ○ |
↓
Space Examples
Example text
Example text
リサイズ可能
<div class="-p:15 -p_sm -bd" style="--p_sm:var(--s20)"> <p>Example text</p> <p class="-my-s:15 -mx:20">Example text</p></div>Width & Height
Section titled “Width & Height”| Property | Shorthand | To Class | BP |
|---|---|---|---|
width | w | 100%,fit(fit-content) | ○ |
height | h | 100% | ○ |
max-width | max-w | 100% | ○ |
max-height | max-h | 100% | ○ |
min-width | min-w | 100% | ○ |
min-height | min-h | 100% | ○ |
inline-size | sz | - | - |
max-inline-size | max-sz | s,m,l,xl,full,container | - |
min-inline-size | min-sz | - | - |
block-size | ysz | - | - |
max-block-size | max-ysz | - | - |
min-block-size | min-ysz | - | - |
関連トークン: SIZE
Displays
Section titled “Displays”| Prop | Shorthand | To Class | BP |
|---|---|---|---|
display | d | none,block,in-flex(inline-flex) | ○ |
visibility | v | hidden | - |
opacity | op | OPACITY, 0 | - |
overflow | ov | auto, clip, hidden | - |
overflow-x | ovx | auto, clip, scroll | - |
overflow-y | ovy | auto, clip, scroll | - |
aspect-ratio | ar | 21/9,16/9,3/2,1/1,og | ○ |
Positions
Section titled “Positions”| Prop | Shorthand | To Class | BP |
|---|---|---|---|
position | pos | rel(relative),abs(absolute),static,fixed,sticky | - |
top | t | 0,50%,100% | - |
left | l | 0,50%,100% | - |
right | r | 0,50%,100% | - |
bottom | b | 0,50%,100% | - |
z-index | z | -1, 0, 1, 99 | - |
inset | i | 0 | - |
inset-inline | i-x | - | - |
inset-block | i-y | - | - |
inset-inline-start | i-x-s | - | - |
inset-inline-end | i-x-e | - | - |
inset-block-start | i-y-s | - | - |
inset-block-end | i-y-e | - | - |
position:absoluteで要素を配置する例をいくつか紹介します。
↓
配置の指定例
A
B
C
D
E
F
G
H
I
リサイズ可能
<Box pos='rel' ar='3/2' lh='1' ff='mono'> <HTML.div pos='abs' l='0' t='0' bgc='base-2' bd p='10'>A</HTML.div> <HTML.div pos='abs' l='0' r='0' w='fit' mx='auto' bgc='base-2' bd p='10'>B</HTML.div> <HTML.div pos='abs' r='0' t='0' bgc='base-2' bd p='10'>C</HTML.div> <HTML.div pos='abs' l='0' t='0' b='0' h='fit' my='auto' bgc='base-2' bd p='10'>D</HTML.div> <HTML.div pos='abs' i='0' m='auto' w='fit' h='fit' bgc='base-2' bd p='10'>E</HTML.div> <HTML.div pos='abs' r='0' t='0' b='0' h='fit' my='auto' bgc='base-2' bd p='10'>F</HTML.div> <HTML.div pos='abs' l='0' b='0' bgc='base-2' bd p='10'>G</HTML.div> <HTML.div pos='abs' l='0' r='0' b='0' w='fit' mx='auto' bgc='base-2' bd p='10'>H</HTML.div> <HTML.div pos='abs' r='0' b='0' bgc='base-2' bd p='10'>I</HTML.div></Box>Layouts
Section titled “Layouts”| Property | Shorthand | To Class | BP |
|---|---|---|---|
gap | g | SPACE,inherit | ○ |
column-gap | g-x | - | ○ |
row-gap | g-y | - | ○ |
| Prop | Shorthand | To Class | BP |
|---|---|---|---|
flex-wrap | fxw | wrap | ○ |
flex-direction | fxd | col(column),col-r(column-reverse),row-r(row-reverse) | ○ |
flex | fx | 1 | ○ |
flex-shrink | fxsh | 0 | - |
flex-grow | fxg | 1 | - |
flex-basis | fxb | - | ○ |
| Prop | Shorthand | To Class | BP |
|---|---|---|---|
grid-template | gt | - | ○ |
grid-template-areas | gta | - | ○ |
grid-template-columns | gtc | subgrid | ○ |
grid-template-rows | gtr | subgrid | ○ |
grid-auto-flow | gaf | col(column),row | ○ |
grid-auto-rows | gar | - | - |
grid-auto-columns | gac | - | - |
grid-area | ga | 1/1 | ○ |
grid-column | gc | 1/-1 | ○ |
grid-row | gr | 1/-1 | ○ |
grid-column-start | gcs | - | - |
grid-row-start | grs | - | - |
grid-column-end | gce | - | - |
grid-row-end | gre | - | - |
Places
Section titled “Places”| Prop | Shorthand | To Class | BP |
|---|---|---|---|
align-items | ai | center, start, end, flex-s, flex-e, stretch | ⚪︎ |
align-content | ac | center, start, end, flex-s, flex-e, between | ⚪︎ |
justify-items | ji | center, start, end, flex-s, flex-e, stretch | ⚪︎ |
justify-content | jc | center, start, end, flex-s, flex-e, between | ⚪︎ |
align-self | aslf | center, start, end, stretch | - |
justify-self | jslf | center, start, end, stretch | - |
order | order | -1, 0, 1 | - |
Styling
Section titled “Styling”Background
Section titled “Background”| Prop | Shorthand | To Class | BP |
|---|---|---|---|
background | bg | - | ⚪︎ |
Shadow
Section titled “Shadow”| Prop | Shorthand | To Class | BP |
|---|---|---|---|
box-shadow | bxsh | SHADOW | - |
Radius
Section titled “Radius”| Prop | Shorthand | To Class | BP |
|---|---|---|---|
border-radius | bdrs | RADIUS | ○ |
Border
Section titled “Border”| Prop | Shorthand | To Class | BP |
|---|---|---|---|
border | bd | none | - |
--bdc | bdc | divider(--divider), inherit | - |
--bds | bds | dashed,dotted,double | - |
--bdw | bdw | - | ○ |
border-top | bd-t | - | - |
border-right | bd-r | - | - |
border-bottom | bd-b | - | - |
border-left | bd-l | - | - |
border-inline | bd-x | - | - |
border-block | bd-y | - | - |
border-inline-start | bd-x-s | - | - |
border-inline-end | bd-x-e | - | - |
border-block-start | bd-y-s | - | - |
border-block-end | bd-y-e | - | - |
borderに関する仕様は少し特殊になっています。詳しくはborderページをご覧ください。
Other CSS
Section titled “Other CSS”| Prop | Shorthand | To Class | BP |
|---|---|---|---|
float | float | left,right | - |
clear | clear | both | - |
isolation | isolation | isolate | - |
overflow-wrap | ovwrap | any(anywhere) | - |
white-space | whitespace | nowrap | - |