Custom Property Intro

Custom Property Intro

Hard CSS CSS Foundations 24 views
Explanation Complexity

Problem Statement

Create a CSS variable for meetcode brand color and use it.

Input Format

No input.

Output Format

Print the HTML+CSS code in one block.

Constraints

Use a custom property and reuse it.

Input / Output Format

Input Format
No input.
Output Format
Print the HTML+CSS code in one block.
Constraints
Use a custom property and reuse it.

Examples

Input:
Output:
(HTML+CSS code)

Example Solution (Public)

CSS
<!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>

Official Solution Code

<!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>
Please login to submit solutions.
Editor
Output

                                        
Please login to submit solutions.