Skip to content
This repository was archived by the owner on Jan 17, 2025. It is now read-only.

Commit b20ea95

Browse files
committed
Attribution box: shrink the icon less, add some margins and support smaller images.
1 parent d6cd27d commit b20ea95

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

css/cc-attribution-box.css

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap');
22

33
.cc-attribution-box-container {
4+
display: inline-block;
45
position: relative;
56
}
67
.cc-attribution-box {
@@ -23,15 +24,18 @@
2324
line-height: 22px;
2425
}
2526
.cc-attribution-box > * {
26-
margin: 0 5px;
27+
margin: 5px;
2728
}
2829
.cc-attribution-box a {
2930
color: black;
3031
text-decoration: none;
3132
}
33+
.cc-attribution-box a.cc-attribution-box-license {
34+
flex-shrink: .5;
35+
}
3236

3337
.cc-attribution-box img {
34-
height: 53px;
38+
height: 48px;
3539
margin: 20px 0;
3640
}
3741

includes/class-creativecommons-image.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ public function simple_license_block($att_id) {
699699

700700
return "<div>" . esc_html($credit) . "</div>"
701701
."<a target='_blank' href='" . esc_url($attribution_url) . "'>$title</a>"
702-
. "<a target='_blank' href='" . esc_url($license_url) . "' title='" . esc_attr($license_name) . "'>"
702+
. "<a class='cc-attribution-box-license' target='_blank' href='" . esc_url($license_url) . "' title='" . esc_attr($license_name) . "'>"
703703
. "<img src='" . esc_url($button_url) . "' alt='" . esc_attr($license_name) . "'></a>";
704704
}
705705

0 commit comments

Comments
 (0)