Things to remember CSS Flashcards
How to delay animations
transition-delay: 250ms;
How to deal with stuttered and glitched animations
will-change: transform;
Tells browser to use gpu and don’t detour through CPU
Most common Transitions and use
transition: ease-out; (for things entering the screen)
transition: ease-in; (for things exiting the screen)
transition: ease; (for general Animations without entering or exiting)
How to write Text vertical?
writing-mode: vertical-lr; (left-right)
writing-mode: vertical-rl; (right-left)
What is the shorthand Flex?
flex: (grow) (shrink) (basis);
The different border styles
none, hidden
dotted ….. , dashed —– , solid _____
double , groove , ridge
inset, outset
How to shift elements?
transform: translate (X, Y);
transform: translateX() or translateY ()
Implement different rules for screen sizes with media querrys
@media only screen and (max-with: 400px) -> for mobile e.g.
What is the diffrence between <div> and <span></span>
A <div> is a block-level element. A block-level element always starts on a new line. In a block layout, boxes are laid out one after the other, vertically, beginning at the top of a containing block.
While a <span> is a inline-level element, and layouted inline.</span>
What is the short hand in CSS Grid to define rows, columns and areas all at one?
grid-template: ;
It accepts rows, then a slsh then columns:
grid-template: 1fr
2fr
/ 2fr 1fr 2fr;
Putting each row on a new line helps resemble the layout.
How do items override there order of flow and go first in Grid?
row-positioned items are handled first, after which the Gtrid starts again from the top (instead continuing as usual).
item {
grid-row: 2;
}
How to change the placement of items in a Grid?
With order. Default is:
order: 0;
Higher numbers place it at the end, lower in front.
row-positioned items still have priority.
How to change the flow of the grid from rows to columns first?
grid-auto-flow: column;
How to fill in cells, Grid already skipped?
With
grid-auto-flow: dense;
(sparse is the default)
How to set up Grid Areas?
grid-template-areas: “. rocky rocky .”
“. . dunes .”
“. . dunes .”
“. . dunes .”;
Then on the item to place:
rocky {
grid-area: rocky;
What is implicit rows/columns default and how to change it?
By default addidtional created rows/coulmns have ‘auto’ as default. They collapse without content.
With
grid-auto-rows/columns: 100px (or 1fr etc.);
you can control the size of new ones.
How do items in a grid cell behave when given height or width in %?
The % units are relative to the grid cell rather than the grid container
How to place items horizontally in a grid cell?
justify-items: ;
(start, center, end, stretch)
How to override justify-items in CSS Grid?
justify-self ;
How to place items vertically in a grid cell?
align-items: ;
(start, center, end, stretch)
How to arrange Columns in CSS Grid if there is more space available than needed?
With
justify-content: ;
(start, center, end, space-between, space-evenly, space-around, stretch[auto columns])
How to arrange rows in CSS Grid if there is more space available than needed?
With
align-content: ;
(start, center, end, space-between, space-evenly, space-around, stretch[auto rowsalign])
What is destructured Assignment?
A way to pick out parts of an object or array to use it seperately.
const person = {name: ‘Alice’, age: 30, country: ‘USA’};
const {name,age} = person;
So the const declares name and age as values, which gets drafted from the person object.
How does the shorthand grid-area work?
It is short for grid-row/column start and end lines.
grid-area: 1 (row-start) / 1 (column-start) / 3 (row-end) / 3 (column-end);
it starts with the starting row line and goes clockwise from there.


tag when a user highlights text in that element ## Footnote Example: p::selection { background-color: yellow; }.