Chapter 5 Flashcards
What should a mockup/wireframe include?
User interface, links, buttons, etc
What is a mockup/wireframe, and why is it important?
A rough sketch of what the application will eventually look like; it allows you to work towards a goal.
To support older browsers which can’t parse HTML5 elements, what JavaScript script should be added, and where?
HTML5shim should be added in the head
What is the difference between a class an an ID?
Classes can be used multiple times on a page, ID’s can only be used once.
T/F: only one class may be assigned to a tag.
F; you can assign multiple classes by separating them with a space
What are header, nav, and section tags for?
They are used like div tags, except that they also describe the location of the element on the page.
What are the three arguments to the link_to function, and what purpose does the function serve?
It creates a link on the page.
The first argument is the link text, next is the url, and last is an options hash for CSS purposes
When using the image_tag helper, where will Rails look for the image?
app/assets/images/
What are the arguments to image_tag?
The path of the image and an options hash, used to set attributes
Why does rails place all assets in the same directory when operating on a server?
It allows them to be served faster.
What is Bootstrap?
A framework from Twitter which allows for design and UI elements in HTML5
What is a .css.scss file?
A Sass-CSS file
How can we include bootstrap?
After getting the gem, add the following lines to a sass file in the asset pipeline:
@import “bootstrap-sprockets”;
@import “bootstrap”;
What is a good way to test out what a CSS rule does?
Comment it out and see what changes
Why is the CSS of a style sheet in the app/assets/stylesheets/ directory universal?
It is applied to all pages, and if no class or ID is specified then all tags as well. The higher level of the tag (I.e. html is the highest tag) then the more tags that will be affected.