Hosted Fields Styling

Style the BR-DGE Hosted Fields however you want using different CSS properties.

After you have added the BR-DGE Hosted Fields Module to your App you can customize using the list of CSS properties below.

If a property is not listed below please get in contact with support to check whether it can be used.

Example

Set your customisation when creating your BR-DGE Hosted Fields Plugin Module Component:

comcarde.hostedFields.create(
{
client: clientInstance,
styles: {
// Style all elements
input: {
'font-size': '16px',
color: '#3A3A3A',
'font-family': 'monospace',
},

// Styling element state
':focus': {
color: 'blue',
},
'.valid': {
color: 'green',
},
'.invalid': {
color: 'red',
},

// Media queries
// Note that these apply to the iframe, not the root window.
'@media screen and (max-width: 700px)': {
input: {
'font-size': '16px',
},
},
}
}
}

List of CSS Properties

PropertyDescription
-moz-appearanceUsed in Gecko (Firefox) to display an element using platform-native styling based on the operating system's theme.
-moz-osx-font-smoothingUsed in Gecko (Firefox) to smooth over any jagged edges of text displayed due to pixel size.
-moz-tap-highlight-colorUsed in Gecko (Firefox) to set the color of the highlight that appears over a link while it's being tapped.
-moz-transitionUsed in Gecko (Firefox) to define the transition between two states of an element, for example :hover or :active.
-webkit-appearanceUsed by WebKit-based browsers to display an element using platform-native styling based on the operating system's theme.
-webkit-box-shadowUsed by WebKit-based browsers to add shadow effects around an element’s frame.
-webkit-font-smoothingUsed by WebKit-based browsers to smooth over any jagged edges of text displayed due to pixel size.
-webkit-tap-highlight-colorUsed by WebKit-based browsers to set the color of the highlight that appears over a link while it's being tapped.
-webkit-text-fill-colorUsed by WebKit-based browsers specify the fill color of characters of text. If this property is not set, the value of color is used instead.
-webkit-transitionUsed by WebKit-based browsers to define the transition between two states of an element, for example :hover or :active.
appearanceUsed by WebKit-based browsers such as Safari to display UI elements with platform-specific styling, based on the operating system's theme.
background-colorSets the background color of an element.
border-radiusRounds the corners of an element's outer border edge.
borderSets the properties of the border of an element. It sets the border-width, border-style & border-color in one value.
box-shadowAdds shadow effects around an element’s frame.
colorSets the color of characters of text. Color can be defined in many different ways, such as a color name (‘blue’), hexidecimal notation (#0000FF), RGB (0,0,255) as well as others.
directionSets the direction of text, table columns, and horizontal overflow.
filterApplies graphical effects like blur or color shift to an element.
font-familySets the family of the font.
font-size-adjustProvides a way to modify the size of lowercase letters relative to the size of uppercase letters.
font-sizeSets the size of the font.
font-stretchAllows you to make text narrower (condensed) or wider (expanded).
font-styleSets whether a font should be styled with a normal, italic, or oblique face from its font-family.
font-variant-alternatesUsed to specifically select alternate glyphs.
font-variant-capsControls the usage of alternate glyphs for capital letters.
font-variant-east-asianControls the use of alternate glyphs for East Asian scripts, like Japanese and Chinese.
font-variant-ligaturesAllows you to adjust various ligatures on a font.
font-variant-numericControls the usage of alternate glyphs for numbers, fractions, and ordinal markers.
font-variantSets all the font variants for a font.
font-weightSets how thick or thin characters in text should be displayed.
fontShorthand single property capable of setting font-style, font-variant, font-weight, font-size & font-family in a single property.
heightSpecifies the height of an element. By default, the property defines the height of the content area.
letter-spacingSets the horizontal spacing behavior between text characters.
line-heightSets the height of a line box. It's commonly used to set the distance between lines of text.
marginSets the margin area on all four sides of an element.
margin-leftSets the margin area on the left of an element.
margin-rightSets the margin area on the right of an element.
margin-topSets the margin area on the top of an element
margin-bottom Sets the margin area on the bottom of an element.
opacitySpecifies the opacity/transparency of an element.
outlineSets a line that is drawn around elements, outside the borders, to make the element "stand out".
paddingUsed to create space around an element's content, inside of any defined borders.
text-shadowAdds shadow to text. This property accepts a comma-separated list of shadows to be applied to the text.
transitionAllows you to change property values smoothly, over a given duration.
widthSets an element's width.