-
Notifications
You must be signed in to change notification settings - Fork 246
CSS Guidelines
nana-4 edited this page Mar 1, 2020
·
6 revisions
A small CSS (SCSS) guidelines for the project.
See also:
- https://developer.gnome.org/gtk3/stable/chap-css-overview.html
- https://developer.gnome.org/gtk3/stable/chap-css-properties.html
Indent by 2 spaces at a time. Don’t use tabs.
Example:
.demo {
box-shadow: 0 1px 1px rgba(black, 0.1);
background-image: linear-gradient(to bottom, transparent, rgba(black, 0.1));
}
// If a value is very long:
.demo {
box-shadow:
0 1px 1px rgba(black, 0.1),
0 1px 2px rgba(black, 0.2),
0 1px 3px rgba(black, 0.3);
background-image:
linear-gradient(
to bottom,
transparent,
rgba(black, 0.1) 30%,
rgba(black, 0.2) 50%,
rgba(black, 0.3)
),
linear-gradient(
to right,
transparent,
rgba(black, 0.1) 30%,
rgba(black, 0.2) 50%,
rgba(black, 0.3)
);
}Draw from outside to inside based on the idea of the box model.
TODO:
transitionandanimationshould be moved to bottom?
opacity-
transitiontransition-propertytransition-durationtransition-timing‑functiontransition-delay
-
animationanimation-nameanimation-durationanimation-timing‑functionanimation-delayanimation-iteration-countanimation-directionanimation-fill‑modeanimation-play‑state
min-heightmin-width-
marginmargin-topmargin-bottommargin-leftmargin-right
-
paddingpadding-toppadding-bottompadding-leftpadding-right
-
borderborder-styleborder-widthborder-color
-
border-imageborder-image-sourceborder-image-sliceborder-image-widthborder-image-repeat
-
border-radiusborder‑top‑left‑radiusborder‑top‑right‑radiusborder‑bottom‑left‑radiusborder‑bottom‑right‑radius
-
outlineoutline-styleoutline-widthoutline-color
outline-offset-
-gtk-outline-radius-gtk‑outline‑top‑left‑radius-gtk‑outline‑top‑right‑radius-gtk‑outline‑bottom‑left‑radius-gtk‑outline‑bottom‑right‑radius
box-shadow
-
backgroundbackground-colorbackground-imagebackground-repeatbackground-positionbackground-sizebackground-originbackground-clip
color-
text-decorationtext-decoration-linetext-decoration-styletext-decoration-color
text-shadow-
fontfont-stylefont-weightfont-sizefont-family
-gtk-icon-source-gtk-icon-style-gtk-icon-effect-gtk-icon-transform-gtk-icon-shadow
caret-color-gtk-secondary-caret-color