LOGBOOK

HELP

Quiz Entry - updated: 2026.06.20

How should you customize a CSS library like W3.CSS?

Never edit the library file itself; instead load your own stylesheet after it so the cascade lets your rules override the defaults while keeping the library upgradeable.

<!-- Load library first -->
<link rel="stylesheet" href="w3.css">
<!-- Then load your customizations -->
<link rel="stylesheet" href="custom.css">

In custom.css:

/* Override W3.CSS defaults */
.w3-blue {
    /* Custom blue */
    background-color: #1a73e8 !important;
}

.w3-button {
    border-radius: 4px;
}

Why this approach?

  1. Updates - Can update library without losing changes
  2. Clarity - Easy to see what you've customized
  3. Debugging - Clear separation of library vs custom code

CSS cascade: Later stylesheets override earlier ones (same specificity).

From Quiz: WEBT / Geolocation API and Responsive Layouts | Updated: Jun 20, 2026