00-Global Normalize by baerbeisser

Install Get Stylus Write a review

Details

Authorbaerbeisser

LicenseGPL v3.0

Created

Updated

Categoryall http*, global

Statistics

Learn how we calculate statistics in the FAQ.

Total views35

Total installs8

Weekly installs2

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 1rem as its base, use the browsers font size settings to change.
Sadly, misuse of h1, h2... tags is most often the culprit, i can't fix that.
Name is 00-xx so that you can still overwrite with site-specific styles even though i have to use !important sometimes.

History

Daily snapshots of style statistics.

No style history. Come back in a couple of days.

Source code

/* ==UserStyle==
@name         00-Global Normalize
@version      20220823.21.24
@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;
}

a, p, span, pre, blockquote, input, strong, summary, div, div > * {
    font-size: 1em !important;
    line-height: 1.6em !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;
}

/* Ugh! */
h1 > a, h2 > a, h3 > a,
h4 > a, h5 > a, h6 > a {
    font-size: 1rem !important;
    line-height: 1.6em !important;
    font-weight: bold;
}

/**
 * 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;
}

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

}

Reviews

No reviews yet.