Skip to content

reduce the font size on tablet and mobile #54

@ashehzadgec

Description

@ashehzadgec

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions