Creating Page Layouts with CSS Flashcards
What does semantic tags do to our webpage?
Make it nice for readers and also for indexing
What is the “Do not lie metatag?”
Is a meta element containing the initial definition of width, initial scale and maximum scale.
``
What are the four most used semantic elements? Where are all they located?
header, nav, section, footer. INSIDE the body element.
Where to find fonts? How to import the selected fonts to our website?
fonts.google.com. Import them by using the “embedded” tab and copying the content inside our HEAD element
Is it recommended to use css reset or normalize? What each one does?
css reset resets all the predefined styles defined by the browser. Normalize does the same but less intrusive.
Should we separate CSS files? one example containing 4? Does the order matter?
normalize.css, small, medium and large.css. Yes.
How do the CSS files are organized in a mobile-first approach? How do the CONTENT of these files are activated?
normalize and small are always applied, medium only for tablets and large only for computers. ACTIVATED via media queries.
Regarding border-box: Are margins applied inside the box? what about padding?
margins = OUTSIDE padding = INSIDE
What difference between jpg, png and svg? what does svg mean?
jpg = images;
png = images with transparent backgroud;
svg = scalable images
svg means SCALABLE VECTOR GRAPHIC
When SVG used the most? why?
For icons because they look great for all screen sizes
do div and section has default styling?
NO
What does the clear property do?
It allows removing preceding or succeding floating elements to below
In a regular layout screen, can the elements touch the border of the browser?
no.. this is a design issue.
What is a hero image?
It is an image that brings attention to our site.
Why do we need to set a pre-defined height and weight in our images even when they are overwritten by the css? Does it do what we call “Jank removal”?
So that the image box takes its place before the image downloads and this way the content won’t be pushed down. YES
What happens when you use an absolute element with top:0 without caring about the parent? What is necessary to be done then?
The element will go to the top of the page. necessary to define the parent element as position: relative
Considering a 12 column layout, how much space (%) of the screen a col-lg-3 would ocupy? How many of these will fit in one row?
3/12*100=25%
12/3=4 (4 pieces fit in a 12 column grid)
Why using a css preprocessor? Which is a good sass compiler?
to unify all css files into one. to minimze duplicated code and etc. also has built-in minifier. also nesting.
COMPILE HERO
What is the sr-only in bootstrap?
screen reader only
how a 6 colum row is expressed on bootstrap?
container
row
col-md-6
What does Flexbox replaces in the current float system? Is float system then deprecated?
clear-both -> display: flex; flex-wrap: wrap; float: left -> CAN BE REMOVED; width: 100% -> flex-basis: 100%; .clearfix:after{} -> CAN BE REMOVED;
YES. DEPRECATED.
How to create a set of col-md-X with SASS? Do I have to write each one by hand?
SASS supports loops which allows calculating stuff and also creating dynamic selectors for each col-md-X.
How do we make sure the box model is applied the same for all browsers?
define moz-box, webkit-box and box-sizing to border-box
What is grid system and how many columns is the default size?
Separates the screen in twelve equally separated columns.
What do we need to define in the CSS so the image scales properly?
width: 100%;
height: auto;
Are the HTML elements rendered in the same order defined in the HTML? Is it top to bottom? What is the keyword that change the default behavior?
Yes. Yes. Position.
What is “CSS Slenderize” according do the author?
Using multiple selectors to group to avoid css duplications on too-specific selectors.
What is the drawback of using bootstrap? Why do people choose it anyways?
Its size. 264kb total… where a small project css and js will be 4kb total.. to increase development speed.
Inline-block is a value of which css property?
Display