Add sass mixins, update experience

This commit is contained in:
Oliver Davies 2016-11-29 19:13:09 +00:00
parent a4217b4953
commit 5e3a9c3b4c
4 changed files with 41 additions and 5 deletions

35
assets/sass/_mixins.sass Normal file
View file

@ -0,0 +1,35 @@
=from($device)
@media screen and (min-width: $device)
@content
=until($device)
@media screen and (max-width: $device - 1px)
@content
=mobile
@media screen and (max-width: $screen-tablet - 1px)
@content
=tablet
@media screen and (min-width: $screen-tablet)
@content
=tablet-only
@media screen and (min-width: $screen-tablet) and (max-width: $screen-desktop - 1px)
@content
=touch
@media screen and (max-width: $screen-desktop - 1px)
@content
=desktop
@media screen and (min-width: $screen-desktop)
@content
=desktop-only
@media screen and (min-width: $screen-desktop) and (max-width: $screen-lg - 1px)
@content
=widescreen
@media screen and (min-width: $screen-lg)
@content

View file

@ -1,5 +1,5 @@
.project
&__company--has-logo
.project-company
&.has-logo
a:link,
a:hover
border-bottom: 0
@ -8,8 +8,8 @@
img
max-width: 75%
+breakpoint($screen-sm)
+tablet
max-width: 50%
+breakpoint($screen-md)
+desktop
max-width: 33.3%

View file

@ -2,5 +2,6 @@
@import '../../vendor/bower_components/compass-breakpoint/stylesheets/breakpoint'
@import 'base'
@import 'mixins'
@import 'components/**/*'
@import 'pages/**/*'

View file

@ -1,7 +1,7 @@
{% if page.company %}
{% set company = site.companies[page.company] %}
<div class="project__company project__company--{{ company.logo ? 'has-logo' : 'no-logo' }}">
<div class="project-company {{ company.logo ? 'has-logo' : 'no-logo' }}">
<h2>Built {{ page.freelance ? 'for' : 'whilst at' }}</h2>
{% if company.logo %}