Custom Property Intro
CSS
Hard
2 views
Problem Description
Create a CSS variable for meetcode brand color and use it.
Output Format
Print the HTML+CSS code in one block.
Constraints
Use a custom property and reuse it.
Official Solution
<!doctype html>
<html lang='en'>
<head>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<title>meetcode</title>
<style>
:root { --brand: #0b5; }
.tag { display: inline-block; padding: 6px 10px; border-radius: 999px; background: var(--brand); color: #fff; }
</style>
</head>
<body>
<span class='tag'>meetcode</span>
</body>
</html>
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!