forked from geekman-rohit/css-chassis
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# This is a combination of 2 commits.
# The first commit's message is: Images: Added basic styles jquery-archive#148 Images: Initial Commit jquery-archive#148 # This is the 2nd commit message: Images: Added basic styles jquery-archive#148
- Loading branch information
Showing
7 changed files
with
124 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>CSS Chassis - Images</title> | ||
<meta name="description" content="Styling of Images"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link rel="stylesheet" href="../dist/css/chassis.css"> | ||
<link rel="stylesheet" href="demos.css"> | ||
<link href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600,700,400italic,700italic" rel="stylesheet"> | ||
</head> | ||
<body> | ||
|
||
<h1>CSS Chassis</h1> | ||
|
||
<hr> | ||
<h2>Default Image</h2> | ||
<img class="img" src="http://placehold.it/150x150"> | ||
<hr> | ||
<h2>Rounded Image</h2> | ||
<img class="img-round" src="http://placehold.it/150x150"> | ||
<hr> | ||
<h2>Circle Image</h2> | ||
<img class="img-circle" src="http://placehold.it/150x150"> | ||
<hr> | ||
<h2>Thumbnail Image</h2> | ||
<img class="img-thumbnail" src="http://placehold.it/150x150"> | ||
<hr> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* ========================================================================== | ||
* Images | ||
* ========================================================================== | ||
*/ | ||
|
||
@import | ||
"dist/chassis", | ||
"mixins"; | ||
|
||
.img-round { | ||
@include img(); | ||
border-radius: map-get($img-round, border-radius); | ||
} | ||
.img-circle { | ||
@include img(); | ||
border-radius: map-get($img-circle, border-radius); | ||
} | ||
.img-thumbnail { | ||
@include img(); | ||
display: inline-block; | ||
max-width: 100%; | ||
height: auto; | ||
padding: map-get($img-thumbnail, padding); | ||
line-height: map-get($img-thumbnail, line-height); | ||
background-color: map-get($img-thumbnail, background-color); | ||
border: map-get($img-thumbnail, border-width) map-get($img-thumbnail, border-style) map-get($img-thumbnail, border-color); | ||
border-radius: map-get($img-thumbnail, border-radius); | ||
} | ||
.img-responsive { | ||
@include img(); | ||
display: block; | ||
max-width: 100%; | ||
height: auto; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@mixin img() { | ||
border: 0; | ||
max-width: 100%; | ||
vertical-align: map-get($img-default, alignment); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
( function( root, factory ) { | ||
if ( typeof define === "function" && define.amd ) { | ||
define( [ "./chassis" ], factory ); | ||
} else if ( typeof exports === "object" ) { | ||
module.exports = factory( require( "./chassis" ) ); | ||
} else { | ||
root.chassis = factory( root.chassis ); | ||
} | ||
}( this, function( chassis ) { | ||
|
||
var lineHeight = 1.5; | ||
|
||
chassis.images = { | ||
"img-default": { | ||
name: "Image - Normal", | ||
value: { | ||
"alignment": "middle" | ||
} | ||
}, | ||
"img-round": { | ||
name: "Image - Rounded", | ||
value: { | ||
"border-radius": "9px" | ||
} | ||
}, | ||
"img-circle": { | ||
name: "Image - Circle", | ||
value: { | ||
"border-radius": "50%" | ||
} | ||
}, | ||
"img-thumbnail": { | ||
name: "Image - Thumbnail", | ||
value: { | ||
"padding": "4px", | ||
"line-height": lineHeight, | ||
"background-color": "#fff", | ||
"border-width": "1px", | ||
"border-style": "solid", | ||
"border-color": "#f5f5f5", | ||
"border-radius": "4px", | ||
} | ||
} | ||
|
||
}; | ||
|
||
return chassis; | ||
} ) ); |