bread icon indicating copy to clipboard operation
bread copied to clipboard

Add display: contents

Open ltguillaume opened this issue 3 years ago • 1 comments

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;
    }
`);

ltguillaume avatar Feb 08 '23 07:02 ltguillaume

Hi Guillaume,

Unfortunately I won't be maintaining this project anymore. Since you've already made some great improvements to your fork, I'm archiving it and linking to your repo in the README. Thanks for your contributions!

tobyxdd avatar Apr 03 '23 03:04 tobyxdd