Skip to content

Commit

Permalink
Merge pull request #149 from betravis/browser-support-tables
Browse files Browse the repository at this point in the history
Add browser support tables
  • Loading branch information
rhauck committed Oct 3, 2014
2 parents 99cde7c + 7fd2dd6 commit e712135
Show file tree
Hide file tree
Showing 11 changed files with 240 additions and 0 deletions.
8 changes: 8 additions & 0 deletions _data/browser_support.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
shapes:
- { name: Internet Explorer, support: no-support, version: 11 }
- { name: Chrome, support: support, version: 37 }
- { name: Firefox, support: no-support, version: 32 }
- { name: Safari, support: support, version: 7.1 }
- { name: Opera, support: support, version: 24 }
- { name: iOS, support: support, version: 8 }
- { name: Android, support: no-support, version: 4.4 }
17 changes: 17 additions & 0 deletions _includes/browser-support.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{% comment %}
Valid browser names are id's in flat-icons
internet-explorer, chrome, firefox, safari, opera, ios, android
{% endcomment %}
<table class="browser-support">
<tr>
{% for browser in browser_support %}
{% assign icon = browser.name | downcase | replace:' ','-' %}
<td class="col-{{ browser_support | size }}"><img src="{{ site.baseurl }}/img/browser-logos/{{ icon }}.svg" alt="{{ browser.name }}" title="{{ browser.name }}"></td>
{% endfor %}
</tr>
<tr>
{% for browser in browser_support %}
<td class="{{ browser.support }}">{{ browser.version }}</td>
{% endfor %}
</tr>
</table>
4 changes: 4 additions & 0 deletions _posts/2014-08-01-shapes.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ full_image: project_header/icon-shapes.svg
bg: 67C9b6
permalink: shapes
---

#CSS Shapes

##What is it?
Expand Down Expand Up @@ -48,6 +49,9 @@ Ideas for future work are currently being collected in the [level 2 specificatio

##When can I use it?

{% assign browser_support = site.data.browser_support.shapes %}
{% include browser-support.html %}

CSS Shapes for floats is implemented in WebKit and Blink.
It is [available](http://caniuse.com/#feat=css-shapes){:target="_blank"} in Chrome 37 and Opera 24. It will be available in Safari 8 (and the 7.1 and 6.2 updates).
The [level 1 specification](http://dev.w3.org/csswg/css-shapes/){:target="_blank"}
Expand Down
43 changes: 43 additions & 0 deletions _sass/_common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* * Typography
* * Color & Decoration
* * Images & Background Images
* * Widgets
*/

@mixin halftone($color, $image: 'inherit') {
Expand Down Expand Up @@ -353,3 +354,45 @@ a {
.header.home {
@include halftone($offbgcolor, '/img/trianglify-background.svg')
}

/* Widgets */

/* Browser-Support */

$support-color: lighten(desaturate(#84b24e, 15), 5);
$partial-support-color: desaturate(#fccb5f, 25);
$no-support-color: desaturate(#f0614a, 25);

.browser-support {
table-layout: fixed;
width: 100%;
@for $i from 5 through 8 {
.col-#{$i} { width: 100%/$i; }
}
td {
box-sizing: border-box;
max-height: 1em;
border-left: 2px solid white;
border-right: 2px solid white;
padding: 0.25em 0.5em;
text-align: center;
vertical-align: middle;
}
tr:first-child {
td {
padding-top: 0.4em;
}
td:nth-child(2n + 1) {
background-color: #eee;
}
}
.support {
background-color: $support-color;
}
.partial-support {
background-color: $partial-support-color;
}
.no-support {
background-color: $no-support-color;
}
}
24 changes: 24 additions & 0 deletions img/browser-logos/android.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions img/browser-logos/chrome.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 51 additions & 0 deletions img/browser-logos/firefox.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions img/browser-logos/internet-explorer.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions img/browser-logos/ios.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions img/browser-logos/opera.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions img/browser-logos/safari.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e712135

Please sign in to comment.