Skip to content

Global Normalize by baerbeisser

Details

Authorbaerbeisser

LicenseGPL v3.0

Categoryall http*, global

Created

Updated

Size3.4 kB

Statistics

Learn how we calculate statistics in the FAQ.

Failed to fetch stats.

Description

Ever been annoyed while surfing, researching, that one Webpage has text set to 80% (like a lot do lately, must be fashion), while the next has set it far too large? This style does it's best to fix that, without breaking them.
Continuously tested and improved in the wild.

Notes

This style has font-size: medium as its base, use the browsers font settings to change.
Sadly, misuse of h1, h2... tags is most often the culprit, i can't fix that.

Source code

/* ==UserStyle==
@name         00-Global Normalize
@version      20221126.16.18
@namespace    userstyles.world/user/baerbeisser
@description  Ever been annoyed while surfing, researching, that one Webpage has text set to 80% (like a lot do lately, must be fashion), while the next has set it far too large? This style does it's best to fix that, without breaking them. Sadly, misuse of h1, h2... tags is most often the culprit, i can't fix that.
Continuously tested and improved in the wild.
@author       baerbeisser
@license      GPL v3.0
==/UserStyle== */

@-moz-document url-prefix("http") {
/* reset styling back to (improved) universal standards */
/* https://html.spec.whatwg.org/multipage/rendering.html#sections-and-headings */

html, body {
    font-size: medium;
}

/*
 * content
 */
#container, .container,
#content, .content,
.post-inner {
    min-width: 50vw;
}

/**
 * font
 */
article, aside,
h1, h2, h3, h4, h5, h6,
hgroup, nav, section {
  display: block;
/*margin-block-start: 1rem;
  margin-block-end: 1rem;*/
}

/* always ugly, why people keep doing this? */
h1, h2, h3, h4, h5, h6 {
    text-shadow: none;
}
h1 > a, h2 > a, h3 > a,
h4 > a, h5 > a, h6 > a {
    font-size: 1rem !important;
    line-height: 1.6em !important;
    font-weight: bold;
}

a, p, span, blockquote, input, strong, summary, div, div > * {
    font-size: 1rem !important;
    line-height: 1.5rem !important;
}
a:hover { text-decoration: underline; }

h1, .h1 {font-size: 1.5rem  !important; line-height: 2rem  !important;}
h2, .h2 {font-size: 1.3rem  !important; line-height: 1.8rem  !important;}
h3, .h3 {font-size: 1.15rem !important; line-height: 1.6rem  !important;}
h4, .h4 {font-size: 1rem    !important; line-height: 1.4rem  !important;}
h5, .h5 {font-size: 0.85rem !important; line-height: 1.2rem  !important;}
h6, .h6 {font-size: 0.7rem  !important; line-height: 1rem    !important;}

/* side-navs */
.reference > a { font-size: 80% !important; }

/**
 * lists
 */
dir, dd, dl, dt, menu, ol, ul {
    /*display: block !important;*/
    font-size: 1rem !important;
}
li, li p, li a {
    text-align: match-parent;
    font-size: inherit !important;
}

/**
 * tables
 */

/*td:empty { display: none; }*/

table { display: table; }
caption { display: table-caption; }
colgroup, colgroup[hidden] { display: table-column-group; }
col, col[hidden] { display: table-column; }
thead, thead[hidden] { display: table-header-group; }
tbody, tbody[hidden] { display: table-row-group; }
tfoot, tfoot[hidden] { display: table-footer-group; }
tr, tr[hidden] { display: table-row; }
td, th { display: table-cell; }

colgroup[hidden], col[hidden],
thead[hidden], tbody[hidden], tfoot[hidden], tr[hidden] {
  visibility: collapse;
}

table {
  border-spacing: 0 !important;
  border-collapse: collapse !important;
}

thead, tbody, tfoot, table > tr { vertical-align: middle !important; }
tr, td, td > *, th {
    vertical-align: inherit !important;
    line-height: 1.3em !important;
    font-size: 1rem !important;
}
thead {
    font-size: medium !important;
    line-height: 1.2em !important;
}

code, pre,
code span,
#highlight,
.highlight {
    font-size: 0.8rem !important;
    font-family: monospace;
    overflow-x: scroll;
}

/* github... listen, there's a <code> tag for code */
.blob-code-content > table *,
.highlight-source-shell * {
    font-size: 0.8rem !important;
}

}

Reviews

No reviews yet.