Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-backgrounds/parsing/background-shorthand.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Backgrounds and Borders Module Level 3: background sets longhands</title>
<meta name="assert" content="background sets all of its longhands, and omitted longhands to their initial values.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/shorthand-testcommon.js"></script>
</head>
<body>
<script>
'background-position': 'left top',
'background-size': 'auto',
'background-repeat': 'repeat-x',
'background-attachment': 'scroll',
'background-origin': 'padding-box',
'background-clip': 'border-box',
'background-color': 'purple',
});
'background-position': '50% 50%',
'background-size': 'auto',
'background-repeat': 'repeat-y',
'background-attachment': 'scroll',
'background-origin': 'padding-box',
'background-clip': 'border-box',
'background-color': 'purple',
});
'background-position': 'center center',
'background-size': 'auto',
'background-repeat': 'repeat',
'background-attachment': 'scroll',
'background-origin': 'padding-box',
'background-clip': 'border-box',
'background-color': 'purple',
});
'background-position': '12px center',
'background-size': 'auto',
'background-repeat': 'no-repeat',
'background-attachment': 'scroll',
'background-origin': 'padding-box',
'background-clip': 'border-box',
'background-color': 'purple',
});
'background-position': 'left 50px',
'background-size': 'auto',
'background-repeat': 'round',
'background-attachment': 'scroll',
'background-origin': 'padding-box',
'background-clip': 'border-box',
'background-color': 'purple',
});
'background-position': '25px 25px',
'background-size': 'auto',
'background-repeat': 'space',
'background-attachment': 'scroll',
'background-origin': 'padding-box',
'background-clip': 'border-box',
'background-color': 'purple',
});
</script>
</body>
</html>