nathanford / min-max-font-size Goto Github PK
View Code? Open in Web Editor NEWUsing vw or vh CSS units? Set a min or max font-size for your type.
Using vw or vh CSS units? Set a min or max font-size for your type.
While i am applying min-font-size or max-font size to button it doesn't work.
I just included the script and get this error. http://new.gruene-neun.de/
Did i something wrong or is there an error in the script?
Thanks!
I thought to remove the ugly lage font size jump during load I could use a media query to only trigger under a certain size, but kills the JS
I can't seem to get this polyfill to work. I have to generate the CSS styling after the initial page is loaded (e.g. using something which essentially boils down to document.styleSheets[0].insertRule("test { min-font-size: 44px }")
.
The instructions say to put the script at the end of the body, which makes me think this is important and why it isn't working, because I don't actually have any CSS when the page is first loaded - everything is generated dynamically using javascript (both HTML elements and the accompanying CSS).
Is there some way to get this polyfill to work for this use case?
At init() I get:
Uncaught SyntaxError: Failed to execute 'querySelectorAll' on 'Document': '*/
.fc-Bookmark' is not a valid selector.
at line 234:
var eles = document.querySelectorAll(selector)
because in a CSS file I have something like:
/.fc-BookmarkContainer{/
/width:85%;/
/height: 15%;/
/min-height: 42px;/
/max-height: 90px;/
/}/
.fc-Bookmark{
...
}
I solved it by removing the commented block ('.fc-BookmarkContainer') from the CSS file.
Got this error after implementation.
Sometimes if you refresh in Chrome it does not end up downsizing the font like it should, but this doesn't seem to happen when you navigate to the page from another page.
Also sometimes you can see the font jump from large to downsized - right now I'm trying to play with fading the font in or showing it, once MM has been applied.
Could be possible it's loading before the DOM is fully ready?
edit: typo.minMaxFontSize(rule.selector); does not get fired when it doesn't work.
This is probably me being an idiot somewhere but this script doesn't work for me at all. Just trying out the demo file on latest versions of FF, Safari and Chrome all result in the max-font-size rule being ignored.
Error on Google Chrome 49.0.2601.0 canary (64-bit)
I'm using the script in a Drupal theme (by loading on the theme_name.info file) that includes it in the html head.
Probably it should only run after the page is loaded.
I've tried to comment the stylefill.init in the mm-fontsize.js and call it on window.onload, and the error was gone but there were no visible effects (the new css rules were not being applied)
Got this error after implementation.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.