Skip to content
This repository was archived by the owner on Apr 3, 2023. It is now read-only.
This repository was archived by the owner on Apr 3, 2023. It is now read-only.

Add display: contents #7

@ltguillaume

Description

@ltguillaume

I've been using this for a while now, and found that many issues with adding span elements (e.g. them being organized vertically, or not being rendered at the same vertical position as the text around them, or disappearing spaces), can be solved by adding display: contents. So, addng

// @grant       GM_addStyle

and

GM_addStyle(`
    span[style*="bolder"] {
        display: contents !important;
    }
`);

solves many issues.

A better way of doing this is to replace span.style.fontWeight = 'bolder'; with span.className = 'bread'; and to add

GM_addStyle(`
    span.bread {
        display: contents !important;
        font-weight: bolder;
    }
`);

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions