Skip to content

Commit

Permalink
adding checkerboard css for white/transp. SVG (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
drfho committed Sep 7, 2023
1 parent 67ef904 commit 0409072
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions src/Products/CMFCore/dtml/custimage.dtml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
<dtml-var "tag(scale=250.0 / _.int(height), css_class='img-thumbnail', id='preview')">
<dtml-elif "width==-1 and getId().split('.')[-1]=='svg'">
<!-- SVG images whose dimensions are not determinable -->
<object id="preview" class="img-thumbnail"
<object class="img-thumbnail"
alt="preview" title="Preview"
data="&dtml-absolute_url;" type="image/svg+xml"
onload="this.style.maxWidth='99.99%'" />
Expand All @@ -117,13 +117,15 @@
</figure>
<style>
/* <!-- Checkerboard background visualizing white and transparency */
figure#preview img {
figure#preview img,
figure#preview object {
background-color: #fff;
background-position: 0px 0px, 10px 10px;
background-position: 4px 4px, 14px 14px;
background-size: 20px 20px;
background-image:
linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%, #eee 100%),
linear-gradient(45deg, #eee 25%, white 25%, white 75%, #eee 75%, #eee 100%);"
linear-gradient(45deg, #eee 25%, white 25%, white 75%, #eee 75%, #eee 100%);
box-shadow: inset 0px 0px 0px 4px #fff;
}
/* -->*/
</style>
Expand Down
2 changes: 1 addition & 1 deletion src/Products/CMFCore/dtml/custprops.dtml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<em>Select a destination folder and press the button
to make a copy of these properties that can be customized.</em><br>
<select name="folder_path" size="1">
<dtml-in expr="listCustFolderPaths('Folder')">
<dtml-in expr="listCustFolderPaths('Folder', int(REQUEST.get('max',20)))">
<option value="&dtml-sequence-key;">&dtml-sequence-item;</option>
</dtml-in>
</select>
Expand Down

0 comments on commit 0409072

Please sign in to comment.