Skip to content

Instantly share code, notes, and snippets.

@rachaelshaw
Last active December 13, 2017 22:20
Show Gist options
  • Save rachaelshaw/dde2c54dfe17191d5399d65c7e279b38 to your computer and use it in GitHub Desktop.
Save rachaelshaw/dde2c54dfe17191d5399d65c7e279b38 to your computer and use it in GitHub Desktop.
Ration example app final styles
// Replaces assets/styles/pages/things/available-things.less
#available-things {
.page-header {
text-align: center;
padding-top: 25px;
padding-bottom: 35px;
h1 {
.container-sm();
font-size: 22px;
font-weight: 900;
margin-bottom: 10px;
}
h2 {
.container-sm();
font-size: 15px;
color: @text-muted;
}
.header-buttons {
padding-top: 10px;
.btn {
margin-left: 5px;
margin-right: 5px;
cursor: pointer;
&:first-child {
margin-left: 0px;
}
&:last-child {
margin-right: 0px;
}
}
}
}
.listings {
max-width: 1000px;
margin: 0 auto;
column-width: 230px;
column-gap: 10px;
margin-bottom: 100px;
.card {
break-inside: avoid;
margin-bottom: 10px;
padding: 10px;
position: relative;
img {
display: block;
width: 100%;
height: auto;
margin-bottom: 10px;
position: relative;
z-index: 10;
}
.card-options {
position: absolute;
top: 15px;
right: 15px;
z-index: 50;
.options-toggle, .options-button {
width: 30px;
height: 30px;
line-height: 30px;
text-align: center;
display: inline-block;
cursor: pointer;
font-size: 22px;
color: @text-normal;
background-color: rgba(255,255,255,0.5);
border-radius: 3px;
opacity: 0;
transition: all 250ms;
&.borrow {
font-size: 18px;
}
&:hover {
background-color: rgba(255,255,255,0.7);
}
}
.dropdown-menu {
.dropdown-item {
cursor: pointer;
}
}
}
&:hover {
.card-options {
.options-toggle, .options-button {
opacity: 1;
}
}
}
&.not-available {
opacity: 0.6;
background-color: darken(@accent-white, 4%);
}
}
}
.empty {
border-top: 1px solid @border-lt-gray;
padding-top: 25px;
}
.photo-uploader {
// padding: 5px;
.photo-upload-field {
min-height: 150px;
.file-upload-button {
position: relative;
cursor: pointer;
.file-input {
opacity: 0;
width: 100%;
height: 100%;
top: 0px;
left: 0px;
position: absolute;
cursor: pointer;
}
}
.photo-preview {
.image-wrapper {
background-color: @bg-lt-gray;
width: 100%;
img {
width: 100%;
}
.placeholder-icon {
color: @text-muted;
font-size: 42px;
}
}
}
.image-advice {
margin-top: 15px;
font-size: 13px;
line-height: 16px;
}
}
&.empty {
.image-wrapper {
min-height: 150px;
}
}
}
.item-preview {
.card {
padding: 10px;
width: 100%;
max-width: 250px;
img {
width: 100%;
height: auto;
}
}
}
.field-wrap {
position: relative;
.datepicker-wrapper {
.form-control {
padding-left: 50px;
}
}
.datepicker-label {
position: absolute;
top: 9px;
left: 10px;
font-size: 14px;
}
}
@media (max-width: 550px) {
.listings .card .card-options {
.options-toggle, .options-button {
opacity: 1;
}
}
}
}
// Replaces assets/styles/styleguide/colors.less
/**
* Color Variables
*/
@brand: #28AFB0;
@error: #B53A03;
@text-normal: #333;
@text-muted: lighten(@text-normal, 60%);
@accent-teal: #28AFB0;
@accent-lt-purple: #7B6D8D;
@accent-green: #77BE69;
@accent-orange: #EE964B;
@accent-yellow: #E8E419;
@accent-red: #F05D5E;
@bg-lt-gray: #f1f1f1;
@border-lt-gray: darken(@bg-lt-gray, 5%);
@accent-lt-gray: darken(#fff, 5%);
@accent-md-gray: darken(#fff, 25%);
@accent-white: #fff;
// Replaces assets/styles/styleguide/layout.less
@footer-height: 40px;
@container-md-max-width: 1100px;
[v-cloak] { display: none }
html, body {
height: 100%;
margin: 0;
}
#page-wrap {
height: 100%;
height: auto!important;
min-height: 100%;
position: relative;
padding-bottom: @footer-height;
header {
a:not(.btn) {
cursor: pointer;
border-bottom: 3px solid transparent;
&.nav-item {
padding-left: 0px;
padding-right: 0px;
margin-right: 20px;
&:hover {
border-bottom-color: @border-lt-gray;
}
&.current {
border-bottom-color: @accent-teal;
}
&:last-child {
margin-right: 0px;
}
}
&.dropdown-toggle {
&:hover {
color: @accent-teal!important;
}
}
}
.dropdown-menu.account-menu {
left: auto;
right: 0px;
}
}
// App-wide styles for our ajax buttons
.ajax-button {
.ajax-button();
}
}
#page-footer {
border-top: 1px solid rgba(0, 0, 0, 0.1);
height: @footer-height;
width: 100%;
position: absolute;
left: 0px;
bottom: 0px;
.xs-only {
display: none;
}
}
@media (max-width: 800px) {
#page-footer {
height: 75px;
.copy, .nav {
width: 100%;
display: block;
text-align: center;
.nav-item {
display: inline-block;
a {
display: inline-block;
}
}
}
}
}
@media (max-width: 450px) {
#page-footer {
height: 85px;
.xs-only {
display: block;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment