Skip to content

Commit

Permalink
move watercolor width and height to css. #59
Browse files Browse the repository at this point in the history
  • Loading branch information
spelkey-ucd committed Mar 16, 2021
1 parent 7313c66 commit a275991
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ return html`
iron-icon {
position: absolute;
}
dams-watercolor {
height: 100%;
width: 100%;
}
</style>
<dams-watercolor
rotate="${this.wcRotation}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import render from "./dams-watercolor.tpl.js";
* @prop {String} srcExt - The watercolor image extension type
* @prop {String} color - The watercolor image. See CSS custom variables for accepted values
* @prop {Number} rotate - Degree to rotate watercolor
* @prop {String} width - Watercolor width
* @prop {String} height - Watercolor height
* @prop {String} element - Type of element to use: img or div
*/
export default class DamsWatercolor extends LitElement {
Expand All @@ -22,8 +20,6 @@ export default class DamsWatercolor extends LitElement {
srcExt: {type: String, attribute: 'src-ext'},
color: {type: String},
rotate: {type: Number},
width: {type: String},
height: {type: String},
element: {type: String}
};
}
Expand Down Expand Up @@ -99,8 +95,6 @@ export default class DamsWatercolor extends LitElement {
"background-image": `url(${this.getImgSrc()})`
};
if (this.rotate) styles.transform = `rotate(${this.rotate}deg)`;
//if (this.width) styles.width = this.width;
//if (this.height) styles.height = this.height;
return styles;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ ${this.element === 'img' ? html`
<img
src="${this.getImgSrc()}"
srcset="${this.getImgSrcSet()}"
height="${this.height}"
width="${this.width}"
height="100%"
width="100%"
alt=""
style="${styleMap(this.getImgStyles())}">
` : html`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,6 @@ return html`
height: 8rem;
margin-left:0px;
}
.featured{
margin: 0;
text-align: center;
background-color: var(--color-aggie-blue-20);
}
.about{
text-align: center;
background-color: var(--color-aggie-blue-40);
Expand Down Expand Up @@ -288,6 +283,14 @@ return html`
margin-left: 0;
margin-right: 0;
}
.featured {
background-color: var(--color-aggie-blue-20);
}
.featured h2 {
margin-bottom: 0;
text-align: center;
margin-top: 0;
}
@media (min-width: 767px) {
.hero-top {
margin-bottom: 60px;
Expand Down Expand Up @@ -423,7 +426,13 @@ return html`
)}
</div>
</section>
<section class="featured site-frame">
<h2>Featured Collections</h2>
<dams-watercolor-overlay
icon="star">
</dams-watercolor-overlay>
</section>
<!--
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a275991

Please sign in to comment.