Commit e893abdd authored by Clement Ho's avatar Clement Ho

Merge branch '237-style-toast-component' into 'master'

Adds styling to the toast component

Closes gitlab-ui#237

See merge request gitlab-org/gitlab-ce!27734
parents 5ba138b1 416d199e
.toast-close { /*
font-size: $default-icon-size !important; * These styles are specific to the gl-toast component.
* Documentation: https://design.gitlab.com/components/toasts
* Note: Styles below are nested in order to override some of vue-toasted's default styling
*/
.toasted-container {
max-width: $toast-max-width;
@include media-breakpoint-down(xs) {
width: 100%;
padding-right: $toast-padding-right;
}
.toasted.gl-toast {
border-radius: $border-radius-default;
font-size: $gl-font-size;
padding: $gl-padding-8 $gl-padding-24;
margin-top: $toast-default-margin;
line-height: $gl-line-height;
background-color: rgba($gray-900, $toast-background-opacity);
@include media-breakpoint-down(xs) {
.action:first-child {
// Ensures actions buttons are right aligned on mobile
margin-left: auto;
}
}
.action {
color: $blue-300;
margin: 0 0 0 $toast-action-margin-left;
text-transform: none;
font-size: $gl-font-size;
&:first-child {
padding-right: 0;
}
}
.toast-close {
font-size: $default-icon-size;
margin-left: $toast-default-margin;
padding-left: $gl-padding;
}
}
}
// Overrides the default positioning of toasts
body .toasted-container.bottom-left {
bottom: $toast-offset;
left: $toast-offset;
} }
...@@ -497,6 +497,17 @@ $pagination-padding-x: 16px; ...@@ -497,6 +497,17 @@ $pagination-padding-x: 16px;
$pagination-line-height: 20px; $pagination-line-height: 20px;
$pagination-disabled-color: #cdcdcd; $pagination-disabled-color: #cdcdcd;
/*
* Toasts
*/
$toast-offset: 24px;
$toast-height: 48px;
$toast-max-width: 586px;
$toast-padding-right: 42px;
$toast-default-margin: 8px;
$toast-action-margin-left: 16px;
$toast-background-opacity: 0.95;
/* /*
* Status icons * Status icons
*/ */
......
---
title: Style the toast component according to design specs.
merge_request: 27734
author:
type: added
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment