Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
ab363d7f
Commit
ab363d7f
authored
Jun 19, 2020
by
Lyza Danger Gardner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract card-frame and card patterns into molecules
parent
4c809500
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
0 deletions
+40
-0
molecules.scss
src/styles/mixins/molecules.scss
+40
-0
No files found.
src/styles/mixins/molecules.scss
View file @
ab363d7f
...
...
@@ -2,6 +2,46 @@
@use
"./layout"
;
@use
"./utils"
;
/**
* A straightforward "frame" that serves as a basis for other card-like
* patterns. May be used on its own for components that don't need all of
* `card` or `panel's` bells and whistles.
*/
@mixin
card-frame
{
@include
utils
.
border
;
border-radius
:
2px
;
box-shadow
:
0px
1px
1px
0px
rgba
(
0
,
0
,
0
,
0
.1
);
background-color
:
var
.
$color-background
;
}
/**
* A "card"-like pattern that may be displayed in vertical lists, a la
* annotation (thread) cards. Will vertically-space its children. Adds a
* hover/active intensified box shadow and accounts for "theme-clean" affordances.
*/
@mixin
card
{
@include
card-frame
;
@include
layout
.
vertical-rhythm
;
padding
:
1em
;
&
:hover
,
&
.is-focused
{
box-shadow
:
0px
2px
3px
0px
rgba
(
0
,
0
,
0
,
0
.15
);
}
&
--theme-clean
{
// Give a little more space so that the border appears centered
// between cards
padding-bottom
:
1
.5em
;
border-bottom
:
1px
solid
var
.
$grey-2
;
box-shadow
:
none
;
&
:hover
{
box-shadow
:
none
;
}
}
}
/**
* horizontally-oriented collection of linked icons
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment