Skip to main content

Social Element

Overview

Social Element component enables you to display a given social network inside mj-social. Note that default icons are transparent, which allows background-color to actually be the icon color.


Parameters

ParameterParameterValid BlocksRequired
ContentContent for this tagText Block GroupNo
Style SetsOptional list of Email Style blocks to apply to this blockText Block GroupNo
Custom CSS ClassesOptional space-separated list of CSS classes to be applied to the element. Intended for use with EmailCSS blocks.Text Block GroupNo
Social NetworkThe social network (if any) to use for styling this element.Text Block GroupNo
Srcunit : px; description : image source; default value : Each social name has its own defaultText Block GroupNo
Srcsetunit : url & width; description : enables to set a different image source based on the viewport; default value : n/a;Srcset Image Block GroupNo
On-Click URIThe link to take the user to when they click on this element.Text Block GroupNo
RelThe rel of the element.Text Block GroupNo
TargetThe target for the link. Defaults to 'external-link'.Text Block GroupNo
Image descriptionUsed by screen readers and e-mail clients with image downloads switched off.Text Block GroupNo
Mouse-over tooltip (title)Displayed on mouse-over and used by accessibility software.Text Block GroupNo
Icon ColourThe colour of icon in this block.Colour Block GroupNo
Icon HeightThe height of the iconUnit Value Block GroupNo
Icon SizeThe size (width and height) of the iconUnit Value Block GroupNo
Sizes: Media queriesOne or more strings separated by commas, indicating a set of source sizes. Each source size consists of:
  1. A media condition. This must be omitted for the last item in the list.

  2. A source size value.

Media Conditions describe properties of the viewport, not of the image. For example, (max-height: 500px) 1000px proposes to use a source of 1000px width, if the viewport is not higher than 500px.

Source size values specify the intended display size of the image. Email clients use the current source size to select one of the sources supplied by the srcset attribute, when those sources are described using width (w) descriptors.

The selected source size affects the intrinsic size of the image (the image"s display size if no CSS styling is applied). If the srcset attribute is absent, or contains no values with a width descriptor, then the sizes attribute has no effect.

Text Block GroupNo
Text ColourThe colour of the text in this block. Defaults to #333333 (dark grey)Colour Block GroupNo
Text SizeThe size of the text in this block.Unit Value Block GroupNo
FontThe list of preferred fonts for this element.Text Block GroupNo
Font StyleWhether the font should be normal (upright) or italicised.Text Block GroupNo
Font WeightHow light or bold the text should be.Text Block GroupNo
Line HeightThe height of each line of text inside the element.Text Block GroupNo
Text DecorationWhether the text should be underlined, overlined, etc.Text Block GroupNo
PaddingThe padding around the element.Text Block GroupNo
Padding BottomThe padding below the element.Unit Value Block GroupNo
Padding LeftThe padding to the left of the element.Unit Value Block GroupNo
Padding RightThe padding to the right of the element.Unit Value Block GroupNo
Padding TopThe padding above the element.Unit Value Block GroupNo
Text PaddingThe padding around the text.Text Block GroupNo
Icon PaddingThe padding around the iconText Block GroupNo
Border RadiusThe rounding radius of the corners of the element.Text Block GroupNo
Horizontal AlignmentHow the block should be aligned horizontally within its container.Text Block GroupNo
Vertical AlignmentVertical position of the element within its container.Text Block GroupNo