diff --git a/app/views/info/old_styleguide.html.erb b/app/views/info/old_styleguide.html.erb
deleted file mode 100644
index 1d28802b990..00000000000
--- a/app/views/info/old_styleguide.html.erb
+++ /dev/null
@@ -1,1394 +0,0 @@
-<%
-# Copyright (C) 2012 - present Instructure, Inc.
-#
-# This file is part of Canvas.
-#
-# Canvas is free software: you can redistribute it and/or modify it under
-# the terms of the GNU Affero General Public License as published by the Free
-# Software Foundation, version 3 of the License.
-#
-# Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
-# details.
-#
-# You should have received a copy of the GNU Affero General Public License along
-# with this program. If not, see
.page-action-list
Rather than copy/pasting all their docs here, We're just going to focus on a few - key things and the things we do different. Go Read the bootstrap docs to see what you can do.
-Bootstrap File | -Reason | -
---|---|
navbar | -We just don't use them yet. no reason we couldn't. They're commented out to just so we transfer less css over the wire. If you want them just uncomment it in app/stylesheets/bootstrap_parts/_main.scss | -
pager | -|
sprites (aka glyphicons) | -We do our own font based icons. | -
button-groups | -- We use jqueryUI buttonsets instead. - They are more accessible (because they use aria stuff and are built on top of native checkbox and radios) - | -
modals | -Use jqueryUI .dialog instead. | -
popovers | -You can have popovers that look exactly like bootstrap ones, ours are just built off jqueryUI tooltips. see below. | -
progress-bars | -Use jqueryUI progressbarsinstead, they have aria stuff that reads back to the screenreader their progress. | -
accordion | -Use jqueryUI instead. | -
Since our interface is resizable you can only use a fluid grid. we just have the default bootstrap fluid grid. see their docs for more info. Use .spanX
to have an element span 'X' number of columns.
span 2
span 2
span 8
Media queries allow for custom CSS based on a number of conditions—ratios, widths, display type, etc—but usually focuses around min-width
and max-width
.
Use media queries responsibly and only as a start to your mobile audiences. For larger projects, do consider dedicated code bases and not layers of media queries.
- -For faster mobile-friendly development, use these utility classes for showing and hiding content by device. Below is a table of the available classes and their effect on a given media query layout (labeled by device).
-Class | -Phones 767px and below | -Tablets 979px to 768px | -Desktops Default | -
---|---|---|---|
.visible-phone |
- Visible | -Hidden | -Hidden | -
.visible-tablet |
- Hidden | -Visible | -Hidden | -
.visible-desktop |
- Hidden | -Hidden | -Visible | -
.hidden-phone |
- Hidden | -Visible | -Visible | -
.hidden-tablet |
- Visible | -Hidden | -Visible | -
.hidden-desktop |
- Visible | -Visible | -Hidden | -
Resize your browser or load on different devices to test the above classes.
-Green checkmarks indicate that class is visible in your current viewport.
-Here, green checkmarks indicate that class is hidden in your current viewport.
- - -The content-box
doesn't do much on its own, sets a background color and some padding for direct children.
The borders aren't defined because border logic varies so much between designs. Use the border classes to define them.
-
- The first element of a this content box is a .toolbar
.
-
- It also has the classes border border-trbl border-round
to make the borders.
-
We've added v-gutter
and v-gutter-large
classes to add some vertical margin to an element equal to the grid's gutters (and * 1.5 for large).
Image blocks float an image (or any content) to the left and keep the content from wrapping beneath it.
-Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
-This is an example of using .admin-links
here is what the code should look like:
-- <div class="admin-link-hover-area"> - <div class="admin-links"> - <button class="al-trigger ui-button"><span class="al-trigger-inner">Manage (will be accessibly hidden)</span></button> - <ul class="al-options"> - <li><a href="#"><span class="ui-icon ui-icon-pencil"></span>Edit</a></li> - <li><a href="#"><span class="ui-icon ui-icon-trash"></span>Delete (from database)</a></li> - <li><a href="#"><span class="ui-icon ui-icon-trash"></span>Hide from this screen</a></li> - <li><a href="#">an option with no icon</a></li> - </ul> - </div> - put all of the content here - </div> --
The "icon-" classes below can only be added to the semantically neutral "i" element. The one exception is text links, to which you can apply the icon class directly (see below for more details).
-<a>
syou can use the same icon classes to add an icon to a plain link. Just add the icon-<whatever>
class to the <a>
- examples:
-
- Do this <a class="icon-add" href="#"></a>
-
- NOT this <a href="#"><i class="icon-add"></i></a> <-- DONT USE THIS CODE
-
TONZ more docs about forms can be found on the bootstrap docs
-Bootstrap provides simple markup and styles for four styles of common web forms.
-Name | -Class | -Description | -
---|---|---|
Vertical (default) | -.form-vertical (not required) |
- Stacked, left-aligned labels over controls | -
Inline | -.form-inline |
- Left-aligned label and inline-block controls for compact style | -
Search | -.form-search |
- Extra-rounded text input for a typical search aesthetic | -
Horizontal | -.form-horizontal |
- Float left, right-aligned labels on same line as controls | -
Smart and lightweight defaults without extra markup.
- -- <form class="well bootstrap-form"> - <label>Label name</label> - <input type="text" class="span3" placeholder="Type something…"> - <span class="help-block">Example block-level help text here.</span> - <label class="checkbox"> - <input type="checkbox"> Check me out - </label> - <button type="submit" class="btn">Submit</button> - </form> --
Add .form-search
to the form and .search-query
to the input
.
- <form class="well form-search"> - <input type="text" class="input-medium search-query"> - <button type="submit" class="btn">Search</button> - </form> -- -
Add .form-inline
to finesse the vertical alignment and spacing of form controls.
- <form class="well form-inline"> - <input type="text" class="input-small" placeholder="Email"> - <input type="password" class="input-small" placeholder="Password"> - <label class="checkbox"> - <input type="checkbox"> Remember me - </label> - <button type="submit" class="btn">Sign in</button> - </form> --
This is the main type of form that we use in canvas
- -Given the above example form layout, here's the markup associated with the first input and control group. The .control-group
, .control-label
, and .controls
classes are all required for styling.
- <form class="form-horizontal"> - <fieldset> - <legend>Legend text</legend> - <div class="control-group"> - <label class="control-label" for="input01">Text input</label> - <div class="controls"> - <input type="text" class="input-xlarge" id="input01"> - <p class="help-block">Supporting help text</p> - </div> - </div> - </fieldset> - </form> -- -
Make any <input>
or <textarea>
element behave like a block level element.
This page demonstrates all available components of our jQuery UI port.
- - -- Hey! Sample ui-state-highlight style.
-Ruh-roh: Sample ui-state-warning style.
-- Alert: Sample ui-state-error style.
-Ohai: Sample ui-state-success style.
-- Hello: Sample ui-state-default style.
-
- Heads up! Don't use .ui-button
in your code
- it still exists just because of the jqueryUI components that generate them as part of their markup.
- This is just to make sure I didn't break that.
-
- <A href="#"> .ui-button - - a.btn -
- -- - - - - -
- -- - - - - -
- - -To add an icon to a button, simply add an i element within the element with the .btn class. (Please note that icons will be suppressed when added to a button with the btn-mini class because they'd look so small as to be illegible at that size.)
-
-
- button class="btn" --> i class="icon-stats"
-
-
- - - - - - -
- - -- Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer - ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit - amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut - odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate. -
-- Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet - purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor - velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In - suscipit faucibus urna. -
-- Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. - Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero - ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis - lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui. -
-- Cras dictum. Pellentesque habitant morbi tristique senectus et netus - et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in - faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia - mauris vel est. -
-- Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus. - Class aptent taciti sociosqu ad litora torquent per conubia nostra, per - inceptos himenaeos. -
-.ui-tabs-minimal
-
- Animate to random number - - -- DON'T USE Jquery UI Icons - Use one of the font based icons above. this is just to make sure we don't break - backward compatibility. -
- - - -"tooltipClass":"popover"
to the data-tooltip
attribute