-
Notifications
You must be signed in to change notification settings - Fork 205
Open
Description
Hy there
I tried to reduce the font size by using media queries but could not find a way to do it.
const createBlotterText = () => {
const text = new Blotter.Text(textEl.innerHTML, {
family : "'Playfair Display',serif",
weight: 900,
size : 150,
paddingLeft: 100,
paddingRight: 100,
paddingTop: 100,
paddingBottom: 100,
fill : 'white'
});
function myFunction(x) {
if (x.matches) { // If media query matches
createBlotterText.size = 60;
}
var x = window.matchMedia("(max-width: 768px)");
myFunction(x) // Call listener function at run time
x.addListener(myFunction) // Attach listener function on state changes
};
I tried different version of this media query in java and css but failed to do so. Any help will be highly appreciated.
Metadata
Metadata
Assignees
Labels
No labels