$this->attributes['class'] = '';
}
+ // Set an additional class for big icons so that they can be styled properly.
+ if (substr($pix, 0, 2) === 'b/') {
+ $this->attributes['class'] .= ' iconsize-big';
+ }
+
// If the alt is empty, don't place it in the attributes, otherwise it will override parent alt text.
if (!is_null($alt)) {
$this->attributes['alt'] = $alt;
// The only class we need for icons is .icon
// Standardize the size, padding and alignment for all icons in Moodle.
+// Size of default icons.
$icon-width: 16px;
$icon-height: 16px;
+// Size of big icons.
+$icon-big-width: 64px;
+$icon-big-height: 64px;
.icon {
font-size: $icon-height;
&.spacer {
margin-right: 0;
}
+
+ &.iconsize-big {
+ width: $icon-big-width;
+ height: $icon-big-height;
+ }
}
$icon-color: $body-color !default;
display: none;
}
+// Size of default icons.
+@icon-width: 16px;
+@icon-height: 16px;
+// Size of big icons.
+@icon-big-width: 64px;
+@icon-big-height: 64px;
+
/* Default Three Columns - All
------------------------------*/
}
/* Icon styles */
img.icon {
- height: 16px;
+ height: @icon-height;
vertical-align: text-bottom;
- width: 16px;
+ width: @icon-width;
padding-right: 6px;
+ &.iconsize-big {
+ width: @icon-big-width;
+ height: @icon-big-height;
+ }
}
img.iconsmall {
height: 12px;
width: 16px;
padding-right: 6px;
}
+img.icon.iconsize-big {
+ width: 64px;
+ height: 64px;
+}
img.iconsmall {
height: 12px;
margin-right: 3px;