Borders and corners

One global border and a brand-level corner radius create a consistent shape across components.

MDS has one border width and one border style. Components use them, and so do the lines that separate interface elements, such as between the side bar and the page or around a card. The width and style are global and the same for all brands. The colour follows the theme.

BorderCSS variableValue
Width
global_border_width
--mds_global_border_width
1px
Style
global_border_style
--mds_global_border_style
solid

Neutral border colours

Neutral border colours are the default for separating and containing elements. Use the standard Border unless you need less or more emphasis:

  • Weak: a subtler border.
  • Strong and strongest: a more prominent border.
  • Inverse: for surfaces that flip, such as a dark panel in a light theme.

See Reading the colour tokens for what the shades mean and Neutral colours for the full set. These are the tokens, with their values for the Maersk brand in the light and dark themes.

UseLightDark
Border
brand_appearance_neutral_default_border-color
--mds_brand_appearance_neutral_default_border-color
rgb(212,212,212)
#D4D4D4
rgb(76,76,76)
#4C4C4C
Weak border
brand_appearance_neutral_weak_border-color
--mds_brand_appearance_neutral_weak_border-color
rgb(226,226,226)
#E2E2E2
rgb(54,54,54)
#363636
Strong border
brand_appearance_neutral_strong_border-color
--mds_brand_appearance_neutral_strong_border-color
rgb(179,179,179)
#B3B3B3
rgb(92,92,92)
#5C5C5C
Strongest border
brand_appearance_neutral_strongest_border-color
--mds_brand_appearance_neutral_strongest_border-color
rgb(54,54,54)
#363636
rgb(212,212,212)
#D4D4D4
Inverse border
brand_appearance_neutral_inverse_border-color
--mds_brand_appearance_neutral_inverse_border-color
rgb(255,255,255)
#FFFFFF
rgb(20,20,20)
#141414

Colour role borders

Use the border colour of a colour role when the border carries that role’s meaning, for example an error border around an invalid field. Use the default border unless you need a subtler one, which is what the weak border is for. See Colours for the colour roles.

UseLightDark
Primary border
brand_appearance_primary_default_border-color
--mds_brand_appearance_primary_default_border-color
rgb(20,20,20)
#141414
rgb(255,255,255)
#FFFFFF
Primary weak border
brand_appearance_primary_weak_border-color
--mds_brand_appearance_primary_weak_border-color
rgb(212,212,212)
#D4D4D4
rgb(54,54,54)
#363636
Secondary border
brand_appearance_secondary_default_border-color
--mds_brand_appearance_secondary_default_border-color
rgb(66,176,213)
#42B0D5
rgb(66,176,213)
#42B0D5
Secondary weak border
brand_appearance_secondary_weak_border-color
--mds_brand_appearance_secondary_weak_border-color
rgb(158,215,234)
#9ED7EA
rgba(23,69,84)
#174554
Success border
brand_appearance_success_default_border-color
--mds_brand_appearance_success_default_border-color
rgb(64,171,53)
#40AB35
rgb(127, 209, 117)
#7FD175
Success weak border
brand_appearance_success_weak_border-color
--mds_brand_appearance_success_weak_border-color
rgb(197,229,194)
#C5E5C2
rgb(27, 70, 23)
#1B4617
Warning border
brand_appearance_warning_default_border-color
--mds_brand_appearance_warning_default_border-color
rgb(255,208,41)
#FFD029
rgb(242, 205, 89)
#F2CD59
Warning weak border
brand_appearance_warning_weak_border-color
--mds_brand_appearance_warning_weak_border-color
rgb(255,235,168)
#FFEBA8
rgb(83, 68, 19)
#534413
Error border
brand_appearance_error_default_border-color
--mds_brand_appearance_error_default_border-color
rgb(184,0,18)
#B80012
rgb(255, 162, 166)
#FFA2A6
Error weak border
brand_appearance_error_weak_border-color
--mds_brand_appearance_error_weak_border-color
rgb(233,178,183)
#E9B2B7
rgb(104, 28, 37)
#681C25
Info border
brand_appearance_info_default_border-color
--mds_brand_appearance_info_default_border-color
rgb(0,89,134)
#005986
rgb(22,134,189)
#1686BD
Info weak border
brand_appearance_info_weak_border-color
--mds_brand_appearance_info_weak_border-color
rgb(161,209,232)
#A1D1E8
rgb(0,62,98)
#003E62

Extended border colours

Extended border colours are for data visualisation, such as lines, markers and the outlines of filled shapes. See Data visualisation colours for how to use them and Extended colours for the full set.

PaletteLightDark
1st
brand_appearance_extended_1_default_border-color
--mds_brand_appearance_extended_1_default_border-color
rgb(22,134,189)
#1686BD
rgb(22,134,189)
#1686BD
2nd
brand_appearance_extended_2_default_border-color
--mds_brand_appearance_extended_2_default_border-color
rgb(0,62,98)
#003E62
rgb(161,209,232)
#A1D1E8
3rd
brand_appearance_extended_3_default_border-color
--mds_brand_appearance_extended_3_default_border-color
rgb(234,93,75)
#EA5D4B
rgb(234,93,75)
#EA5D4B
4th
brand_appearance_extended_4_default_border-color
--mds_brand_appearance_extended_4_default_border-color
rgb(152,31,25)
#981F19
rgb(253,169,158)
#FDA99E
5th
brand_appearance_extended_5_default_border-color
--mds_brand_appearance_extended_5_default_border-color
rgb(17,156,133)
#119C85
rgb(17,156,133)
#119C85
6th
brand_appearance_extended_6_default_border-color
--mds_brand_appearance_extended_6_default_border-color
rgb(3,78,69)
#034E45
rgb(151,222,205)
#97DECD

See also