Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bootstrap
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Administrator
bootstrap
Commits
74d17ab7
Commit
74d17ab7
authored
May 28, 2015
by
Mark Otto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rewrite much of cards and the docs
parent
e07cebc9
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
306 additions
and
151 deletions
+306
-151
docs/components/card.md
docs/components/card.md
+175
-99
scss/_card.scss
scss/_card.scss
+120
-48
scss/_list-group.scss
scss/_list-group.scss
+11
-4
No files found.
docs/components/card.md
View file @
74d17ab7
This diff is collapsed.
Click to expand it.
scss/_card.scss
View file @
74d17ab7
...
...
@@ -2,63 +2,91 @@
// Base styles
//
$card-spacer-x
:
1
.25rem
;
$card-spacer-y
:
.75rem
;
$card-border-width
:
.0625rem
;
$card-border-radius
:
.25rem
;
.card
{
position
:
relative
;
padding
:
1
.25rem
;
margin-bottom
:
1
.25rem
;
border
:
.075rem
solid
#eee
;
margin-bottom
:
$card-spacer-y
;
border
:
$card-border-width
solid
#e5e5e5
;
@include
border-radius
(
$card-border-radius
);
}
.card-block
{
padding
:
$card-spacer-x
;
}
.card-title
{
margin-top
:
0
;
margin-bottom
:
.75rem
;
margin-bottom
:
$card-spacer-y
;
}
.card-text
:last-child
{
.card-subtitle
{
margin-top
:
-
(
$card-spacer-y
/
2
);
margin-bottom
:
0
;
}
.card-actions
{
.card-link
+
.card-link
{
margin-left
:
.75rem
;
}
.card-text
:last-child
{
margin-bottom
:
0
;
}
// .card-actions {
// padding: $card-spacer-y $card-spacer-x;
// .card-link + .card-link {
// margin-left: $card-spacer-x;
// }
// }
.card-link
{
@include
hover
{
text-decoration
:
none
;
}
}
+
.card-link
{
margin-left
:
$card-spacer-x
;
}
}
//
// Optional textual caps
//
@if
$enable-rounded
{
.card
{
>
.list-group
:first-child
{
.list-group-item
:first-child
{
border-radius
:
$card-border-radius
$card-border-radius
0
0
;
}
}
.card-header
{
padding
:
.75rem
1
.25rem
;
margin
:
-1
.25rem
-1
.25rem
1
.25rem
;
border-bottom
:
.075rem
solid
#eee
;
@include
border-radius
(
.25rem
.25rem
0
0
);
}
.card-footer
{
padding
:
.75rem
1
.25rem
;
margin
:
1
.25rem
-1
.25rem
-1
.25rem
;
border-top
:
.075rem
solid
#eee
;
@include
border-radius
(
0
0
.25rem
.25rem
);
>
.list-group
:last-child
{
.list-group-item
:last-child
{
border-radius
:
0
0
$card-border-radius
$card-border-radius
;
}
}
}
}
//
//
Sizing variation
s
//
Optional textual cap
s
//
.card-
sm
{
width
:
15rem
;
}
.card-
header
{
padding
:
$card-spacer-y
$card-spacer-x
;
border-bottom
:
$card-border-width
solid
#eee
;
.card-md
{
width
:
30rem
;
&
:first-child
{
@include
border-radius
(
$card-border-radius
$card-border-radius
0
0
);
}
}
.card-lg
{
width
:
45rem
;
.card-footer
{
padding
:
$card-spacer-y
$card-spacer-x
;
border-top
:
$card-border-width
solid
#eee
;
&
:last-child
{
@include
border-radius
(
0
0
$card-border-radius
$card-border-radius
);
}
}
...
...
@@ -128,7 +156,7 @@
// Card image
.card-img
{
margin
:
-1
.325rem
;
//
margin: -1.325rem;
@include
border-radius
(
.25rem
);
}
.card-img-overlay
{
...
...
@@ -144,11 +172,9 @@
// Card image caps
.card-img-top
{
margin
:
-1
.325rem
-1
.325rem
1
.25rem
;
@include
border-radius
(
.25rem
.25rem
0
0
);
}
.card-img-bottom
{
margin
:
1
.25rem
-1
.325rem
-1
.325rem
;
@include
border-radius
(
0
0
.25rem
.25rem
);
}
...
...
@@ -157,22 +183,36 @@
// Card set
//
.card-set
{
display
:
table
;
table-layout
:
fixed
;
border-spacing
:
1
.25rem
0
;
@if
$enable-flex
{
.card-deck
{
display
:
flex
;
flex-flow
:
row
wrap
;
margin-right
:
-.75rem
;
margin-left
:
-.75rem
;
.card
{
display
:
table-cell
;
float
:
none
;
max-width
:
none
;
.card
{
flex
:
1
0
0
;
margin-left
:
.75rem
;
margin-right
:
.75rem
;
}
}
}
.card-set-wrapper
{
margin-right
:
-1
.25rem
;
margin-left
:
-1
.25rem
;
}
}
@else
{
.card-deck
{
display
:
table
;
table-layout
:
fixed
;
border-spacing
:
1
.25rem
0
;
.card
{
display
:
table-cell
;
float
:
none
;
max-width
:
none
;
}
}
.card-deck-wrapper
{
margin-right
:
-1
.25rem
;
margin-left
:
-1
.25rem
;
}
}
//
// Card groups
...
...
@@ -199,6 +239,38 @@
margin-left
:
0
;
border-left
:
0
;
}
// Handle rounded corners
&
:first-child
{
.card-img-top
{
@if
$enable-rounded
{
border-top-right-radius
:
0
;
}
}
.card-img-bottom
{
@if
$enable-rounded
{
border-bottom-right-radius
:
0
;
}
}
}
&
:last-child
{
.card-img-top
{
@if
$enable-rounded
{
border-top-left-radius
:
0
;
}
}
.card-img-bottom
{
@if
$enable-rounded
{
border-bottom-left-radius
:
0
;
}
}
}
&
:not
(
:first-child
)
:not
(
:last-child
)
{
.card-img-top
,
.card-img-bottom
{
@include
border-radius
(
0
);
}
}
}
}
...
...
scss/_list-group.scss
View file @
74d17ab7
...
...
@@ -10,7 +10,7 @@
.list-group
{
// No need to set list-style: none; since .list-group-item is block level
padding-left
:
0
;
// reset padding because ul and ol
margin-bottom
:
20px
;
margin-bottom
:
0
;
}
...
...
@@ -21,11 +21,11 @@
.list-group-item
{
position
:
relative
;
display
:
block
;
padding
:
10px
15px
;
padding
:
.75rem
1
.25rem
;
// Place the border on the list items and negative margin up for better styling
margin-bottom
:
-
1px
;
margin-bottom
:
-
.0625rem
;
background-color
:
$list-group-bg
;
border
:
1px
solid
$list-group-border
;
border
:
.0625rem
solid
$list-group-border
;
// Round the first and last items
&
:first-child
{
...
...
@@ -37,6 +37,13 @@
}
}
.list-group-flush
{
.list-group-item
{
border-width
:
.0625rem
0
;
border-radius
:
0
;
}
}
// Linked list items
//
...
...
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