Skip to content

Commit

Permalink
Merge pull request #84 from werkbot/hotfix/2.1.12/image-width
Browse files Browse the repository at this point in the history
fix: removed image width 100%
  • Loading branch information
tiller1010 authored Feb 12, 2024
2 parents 3c3815a + c9d1fe7 commit 2eac515
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 49 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "werkbot-framewerk",
"version": "2.1.11",
"version": "2.1.12",
"description": "A framework of css and javascript that Werkbot uses as a foundation to build our websites.",
"main": "js/form.js",
"directories": {
Expand Down
76 changes: 28 additions & 48 deletions sass/elements/image/_image.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,44 @@
Image
Generic image classes
These classes are set from silverstripe html editor
*/
$default-element-img-properties:(
borderRadius: initial,
boxShadow: none
*/
$default-element-img-properties: (
borderRadius: initial,
boxShadow: none
);
// If $element-img-properties is set, lets merge into our defaults
$element-img-properties: $default-element-img-properties !default;
@if($element-img-properties){
@if ($element-img-properties) {
$element-img-properties: recursive-map-merge($default-element-img-properties, $element-img-properties);
}
img{
&.left{
float: left;
padding-right: getThemeProperty(layoutSpace);
padding-bottom: getThemeProperty(layoutSpace);
max-width: 100%;
img {
&.left {
float: left;
padding-right: getThemeProperty(layoutSpace);
padding-bottom: getThemeProperty(layoutSpace);
max-width: 100%;
height: auto;
}
&.right{
float: right;
padding-left: getThemeProperty(layoutSpace);
padding-bottom: getThemeProperty(layoutSpace);
max-width: 100%;
&.right {
float: right;
padding-left: getThemeProperty(layoutSpace);
padding-bottom: getThemeProperty(layoutSpace);
max-width: 100%;
height: auto;
}
&.center{
display: block;
margin: 0 auto;
text-align: center;
padding: getThemeProperty(layoutSpace) 0;
max-width: 100%;
&.center {
display: block;
margin: 0 auto;
text-align: center;
padding: getThemeProperty(layoutSpace) 0;
max-width: 100%;
height: auto;
}
&.leftAlone{
display: block;
text-align: left;
padding: getThemeProperty(layoutSpace) 0;
max-width: 100%;
&.leftAlone {
display: block;
text-align: left;
padding: getThemeProperty(layoutSpace) 0;
max-width: 100%;
height: auto;
}
}
Expand All @@ -49,24 +49,4 @@ img{
box-shadow: getThemeProperty(boxShadow, $element-img-properties);
}
}
@media only screen and (max-width: map-get(getThemeProperty(breakpointResponsive), tablet)) { img{
&.left,
&.right,
&.center,
&.leftAlone{
max-width: 100%;
height: auto;
}
}
}
@media only screen and (max-width: map-get(getThemeProperty(breakpointResponsive), phone)) {
img{
&.left,
&.right,
&.center,
&.leftAlone{
width: 100%;
height: auto;
}
}
}

0 comments on commit 2eac515

Please sign in to comment.