MediaWiki:Search.css

From The Seven Sages of Rome
Revision as of 12:19, 23 January 2026 by Noeth (talk | contribs) (Created page with "Modern Light Search Bar Styling: #p-search.p-search { margin: 0; } #searchform.mw-search { width: 100%; max-width: 400px; } #searchform .input-group { position: relative; border-radius: 0.5rem; overflow: hidden; box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.03); transition: box-shadow 0.15s ease-in-out; } #searchform .input-group:focus-within { box-shadow: 0 0 0 3px rgb(0 0 0 / 0.05); } #searchInput.form-control { border: 1px soli...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/* Modern Light Search Bar Styling */
#p-search.p-search {
    margin: 0;
}

#searchform.mw-search {
    width: 100%;
    max-width: 400px;
}

#searchform .input-group {
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.03);
    transition: box-shadow 0.15s ease-in-out;
}

#searchform .input-group:focus-within {
    box-shadow: 0 0 0 3px rgb(0 0 0 / 0.05);
}

#searchInput.form-control {
    border: 1px solid hsl(240 5.9% 93%);
    background: hsl(0 0% 100%);
    color: hsl(240 10% 3.9%);
    font-size: 14px;
    padding: 0.625rem 1rem;
    height: auto;
    border-radius: 0.5rem;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
    transition: all 0.15s ease-in-out;
}

#searchInput.form-control:focus {
    outline: none;
    background: hsl(0 0% 100%);
    border-color: hsl(240 5.9% 90%);
    box-shadow: none;
}

#searchInput.form-control::placeholder {
    color: hsl(240 4% 60%);
}

.input-group-append {
    margin-left: 0 !important;
}

#searchGoButton.search-btn {
    background: hsl(0 0% 98%);
    border: 1px solid hsl(240 5.9% 93%);
    border-left: none;
    padding: 0.625rem 1rem;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    border-radius: 0.5rem;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    position: relative;
    width: 44px;
}

#searchGoButton.search-btn:hover {
    background: hsl(0 0% 96%);
}

#searchGoButton.search-btn:active {
    background: hsl(0 0% 94%);
}

/* Search Icon (SVG) */
#searchGoButton.search-btn::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}