1
0
Fork 0
mirror of https://gitlab.com/bramw/baserow.git synced 2025-04-04 13:15:24 +00:00

created button component and some base typography

This commit is contained in:
Bram Wiepjes 2019-02-16 18:05:25 +01:00
parent 08f4963e70
commit d5737e8455
8 changed files with 187 additions and 4 deletions

View file

@ -5,9 +5,65 @@
<title>Baserow</title>
</head>
<body>
<h1>
Baserow components
<i class="fas fa-igloo"></i>
</h1>
<h1>Baserow</h1>
<h2>Links</h2>
<p style="padding: 20px;">
Lorem ipsum dolor sit amet, <a href="#">consectetur</a> adipiscing elit. Sed quis gravida ante. Nulla nec elit dui. Nam nec dui ligula. Pellentesque feugiat erat vel porttitor euismod. Duis nec viverra urna. Praesent lobortis feugiat erat, nec volutpat nulla tincidunt vel. In hac habitasse platea dictumst. Aenean fringilla lacus nunc, non pharetra mauris pulvinar lacinia. Aenean ut sem lacinia, sagittis quam sed, pellentesque orci. Aenean non consequat mi. Nunc laoreet ligula a nunc eleifend, nec accumsan felis euismod.
</p>
<h2>Buttons</h2>
<div style="padding: 20px">
<a href="#" class="button">Sign in</a>
<a href="#" class="button disabled">Sign in</a>
<a href="#" class="button button-success">Sign in</a>
<a href="#" class="button button-warning">Sign in</a>
<a href="#" class="button button-error">Sign in</a>
<a href="#" class="button">
Sign in
<i class="button-icon fas fa-lock-open"></i>
</a>
<a href="#" class="button">
<i class="button-icon fas fa-arrow-left"></i>
Go back
</a>
<a href="#" class="button button-ghost">Go back</a>
<a href="#" class="button">
<i class="fas fa-user-check"></i>
</a>
<a href="#" class="button button-ghost">
<i class="fas fa-user-check"></i>
</a>
</div>
<div style="padding: 20px">
<button class="button">Sign in</button>
<button class="button" disabled>Sign in</button>
<button class="button button-success">Sign in</button>
<button class="button button-warning">Sign in</button>
<button class="button button-error">Sign in</button>
<button class="button">
Sign in
<i class="button-icon fas fa-lock-open"></i>
</button>
<button class="button">
<i class="button-icon fas fa-arrow-left"></i>
Go back
</button>
<button class="button button-ghost">Go back</button>
</div>
<div style="padding: 20px">
<a href="#" class="button button-large">Sign in</a>
<a href="#" class="button button-large disabled">Sign in</a>
<a href="#" class="button button-large button-success">Sign in</a>
<a href="#" class="button button-large button-warning">Sign in</a>
<a href="#" class="button button-large button-error">Sign in</a>
<a href="#" class="button button-large">
Sign in
<i class="button-icon fas fa-lock-open"></i>
</a>
<a href="#" class="button button-large">
<i class="button-icon fas fa-arrow-left"></i>
Go back
</a>
<a href="#" class="button button-large button-ghost">Go back</a>
</div>
</body>
</html>

View file

@ -1,3 +1,5 @@
@import url("https://fonts.googleapis.com/css?family=Open+Sans:400,400i,700,700i");
@import "~normalize.css/normalize.css";
$fa-font-path: "~@fortawesome/fontawesome-free/webfonts";

View file

@ -0,0 +1,20 @@
@mixin button-style($background, $active-background, $color: #ffffff) {
background-color: $background;
color: $color;
&:active {
background-color: $active-background;
}
&.disabled,
&[disabled] {
background-color: $background;
}
}
@mixin button-size($font-size, $height, $left-right-space) {
font-size: $font-size;
height: $height;
line-height: $height;
padding: 0 $left-right-space;
}

View file

@ -1,3 +1,5 @@
$text-font-stack: 'Open Sans', sans-serif;
// primary colors
$color-primary-100: #ebf7ff !default;
$color-primary-200: #b5dbf5 !default;

View file

@ -0,0 +1,17 @@
html,
body{
height: 100%;
}
html {
box-sizing: border-box;
}
*, *::before,
*::after {
box-sizing: inherit;
}
:focus {
outline: 0;
}

View file

@ -0,0 +1,23 @@
html{
font-size: 62.5%;
}
body {
color: $color-primary-900;
font-family: $text-font-stack;
font-size: 13px;
}
a {
color: $color-primary-500;
text-decoration: none;
&:hover {
text-decoration: underline;
}
}
p {
color: $color-neutral-500;
line-height: 170%;
}

View file

@ -0,0 +1,57 @@
.button {
cursor:pointer;
display: inline-block;
margin-bottom: 0;
color: #ffffff;
border: 1px solid transparent;
white-space: nowrap;
text-align: center;
vertical-align: middle;
text-decoration: none;
border-radius: 3px;
@include button-size(14px, 32px, 12px);
@include button-style($color-primary-500, $color-primary-600);
&:hover,
&:focus {
text-decoration: none;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.4)
}
&.disabled,
&[disabled] {
cursor: not-allowed;
opacity: 0.65;
box-shadow: none;
}
}
.button-large {
@include button-size(15px, 44px, 28px);
}
.button-success {
@include button-style($color-success-500, $color-success-600);
}
.button-warning {
@include button-style($color-warning-500, $color-warning-600);
}
.button-error {
@include button-style($color-error-500, $color-error-600);
}
.button-ghost {
@include button-style(#ffffff, $color-neutral-100, $color-primary-900);
border-color: $color-neutral-400;
}
.button-icon {
margin: 0 2px;
&.button-large {
margin: 0 3px;
}
}

View file

@ -1,3 +1,9 @@
@import "abstracts/variables";
@import "abstracts/mixins";
@import "vendors";
@import "base/base";
@import "base/typography";
@import "components/button";