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
d29f851e
Commit
d29f851e
authored
Mar 11, 2015
by
Mark Otto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Images are responsive by default
parent
928cfb06
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
23 deletions
+6
-23
scss/_carousel.scss
scss/_carousel.scss
+1
-1
scss/_scaffolding.scss
scss/_scaffolding.scss
+5
-6
scss/mixins/_image.scss
scss/mixins/_image.scss
+0
-16
No files found.
scss/_carousel.scss
View file @
d29f851e
...
...
@@ -21,7 +21,7 @@
// Account for jankitude on images
>
img
,
>
a
>
img
{
@extend
.img-responsive
;
//
@extend .img-responsive;
line-height
:
1
;
}
...
...
scss/_scaffolding.scss
View file @
d29f851e
...
...
@@ -86,14 +86,13 @@ a {
// Images
img
{
// Make them responsive with `max-width` and `height`
max-width
:
100%
;
height
:
auto
;
// Match vertical alignment of most other Bootstrapped elements
vertical-align
:
middle
;
}
// Responsive images (ensure images don't scale beyond their parents)
.img-responsive
{
@include
img-responsive
();
}
// Rounded corners
.img-rounded
{
@include
border-radius
(
$border-radius-lg
);
...
...
@@ -110,7 +109,7 @@ img {
@include
box-shadow
(
0
1px
2px
rgba
(
0
,
0
,
0
,.
075
));
// Keep them at most 100% wide
@include
img-responsive
(
inline-block
);
//
@include img-responsive(inline-block);
}
// Perfect circle
...
...
scss/mixins/_image.scss
View file @
d29f851e
// Image Mixins
// - Responsive image
// - Retina image
// Responsive image
//
// Keep images from scaling beyond the width of their parents.
@mixin
img-responsive
(
$display
:
block
)
{
display
:
$display
;
max-width
:
100%
;
// Part 1: Set a maximum relative to the parent
height
:
auto
;
// Part 2: Scale the height according to the width, otherwise you get stretching
}
// Retina image
//
// Short retina mixin for setting background-image and -size.
...
...
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