Comments (10)
from chrome-minimal-bookmarks-tree.
Pull request opened: #95
from chrome-minimal-bookmarks-tree.
I don't think it is a good way to check all fonts. It is not optimal. The best way is to set the default font css to this <option>
element when you create it.
from chrome-minimal-bookmarks-tree.
The problem is that if I don't check for __default__
then the extension will set the font-family for the select
to the font __default__
, which doesn't exist, but causes the browser to render some other font than the default (no idea which is selects).
I agree that setting a default would be better, but it's system dependent, so I can't know for all computers what their default font is, so I can't supply one.
It is not optimal.
Correct, but it's not like people use this several times a day, I'm sure they can wait an extra few milliseconds when they want to change the font 😉
from chrome-minimal-bookmarks-tree.
Maybe you can use just this after <select>
with all fonts is built:
dropdowns[0].style.fontFamily = "revert"
I think rewriting is better than many checks.
Also it is better to create the "Default" option not in a html file but using JS after <select>
with all fonts is built. It makes no problems.
from chrome-minimal-bookmarks-tree.
dropdowns[0].style.fontFamily = "revert"
That just replaces the CSS, the checking against __default__
would still be needed.
Also it is better to create the "Default" option not in a html file but using JS after <select> with all fonts is built. It makes no problems.
It doesn't really matter. Since it must be there always I prefer it in the HTML as that makes it more clear that it will always be there. It's really not important though.
from chrome-minimal-bookmarks-tree.
OK. An iron working way:
font.children[0].style.fontFamily = "revert"
Or to use "fontList" here:
I have checked this and it works. So only one string fixes this issue without any additional checks.
from chrome-minimal-bookmarks-tree.
No it does not. The issue is that it sets font-family: __default__
on the <select>
element. Your fix does not solve that.
It's fine as is. I don't care about an extremely minor performance thing in a settings form. I didn't actually notice any delay.
Don't fix something that isn't broken.
from chrome-minimal-bookmarks-tree.
Ah, I get it now. It's just that I didn't understand because you solved in the javascript what I would have solved in the HTML.
I've solved it in the HTML now: #100
Thanks 👍
from chrome-minimal-bookmarks-tree.
Oh. I meant exactly that initially 👍
Don't fix something that isn't broken.
Not possible to fix something that isn't broken. It is only about improving.
from chrome-minimal-bookmarks-tree.
Related Issues (20)
- Mouse changes to scroll cursor on middle click HOT 3
- Width field in settings is limited to 600 HOT 1
- Add theming functionality HOT 4
- Right mouse click context menu opens too low when zoom > 100 HOT 13
- Run tests on command line / Replace javascript with different language HOT 3
- Support Chrome Manifest v3 HOT 4
- Fonts with digits don't work HOT 7
- Building doesn't work on Windows after v4.9.1 HOT 11
- Add settings how system folders must be rendered HOT 7
- Set "strict" and "strictNullChecks" TS compilerOptions to true HOT 1
- Disable hover on folder/bookmark when context menu is showing
- Ugly changes after removing zoom HOT 10
- Check if HeigthAnimator can be replaced by Element.animate() HOT 1
- Support dark mode HOT 3
- Scrollbar isn't visible in dark theme
- bookmarklets don't work
- Dark Theme has white border on Right and Bottom sides of the popup
- Remove/hide bookmarks bar HOT 4
- Max height/width shouldn't exist. Let us make it take up the whole screen if we want HOT 2
- 1st Bookmark in Folder Not Opening
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chrome-minimal-bookmarks-tree.