mirror of
https://github.com/phuoc-ng/csslayout.git
synced 2025-10-25 03:36:51 +02:00
feat: Separator
This commit is contained in:
34
styles/patterns/_separator.scss
Normal file
34
styles/patterns/_separator.scss
Normal file
@@ -0,0 +1,34 @@
|
||||
.separator {
|
||||
/* Content is centered horizontally */
|
||||
align-items: center;
|
||||
display: flex;
|
||||
|
||||
/* Used to set the position of text */
|
||||
position: relative;
|
||||
|
||||
/* Demo */
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.separator__content {
|
||||
/* We won't see the separator line */
|
||||
background: #fff;
|
||||
|
||||
/* Displayed at the center of separator */
|
||||
left: 50%;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
|
||||
/* Spacing */
|
||||
padding: 0 0.25rem;
|
||||
|
||||
/* Demo */
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
.separator__separator {
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.3);
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
}
|
||||
Reference in New Issue
Block a user