question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

🐞 Extend Semantics doesn't work

See original GitHub issue

Description

I’m making configurations directly in the HTML as described here: https://docs.master.co/css/customization#other-directly-in-index-html

It’s working for Style.extend('classes',{}) but Style.extend('semantics',{}) wont work. Below is the full code:

<!DOCTYPE html>
<html lang="en">
<head>
   <link href="https://unpkg.com/@master/normal.css" rel="stylesheet">
   <script>
      /* 1. Prevent @master/css from initializing automatically */
      window.MasterCSSManual = true;
   </script>
   <script src="https://cdn.master.co/css"></script>
   <script >
      /* 2. Configure your initial options here ... */
      const Style = window.MasterStyle;
      Style.extend('semantics', {
         fontFamily: {
            customFont: 'Roboto Slab', serif
         }
      });
      /* 3. Manually initialize */
      window.initMasterCSS();
   </script>
</head>
<body>
   <button class="btn">Ok</button>
</body>
</html>

Reproduction

No response

System Informations

Browser: Firefox Developer

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
1aroncommented, Jul 13, 2022

@karchung0930 Correct, we’ll continue to improve the documentation.

1reaction
karchung0930commented, Jul 12, 2022

@1Aron Is init() equal to window.initMasterCSS()? Since the window.MasterCSSManual is set to true, I believe Master CSS is not initialized before. Therefore, .refresh() is not necessary in this case, do you agree?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Table with overflow scrolling does not extend 100% parent width
Bug Report. I have requirements to build a table which allows for horizontal & vertical scrolling, rather than making the window itself ...
Read more >
On Extension of Semantic Meaning - CCJK
The extension of semantic meaning refers to extend a word's meaning according to the context and logical relations and select an exact word...
Read more >
Semantics and Symbols: Examples of Unicode Symbols Usage
I don't want to use HTML markup to enlarge the font, because that adds bulk and ... So, in the end, i thought...
Read more >
leaflet | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >
Changelog | Motion One
10.7.2 16 April 22. 🐞 Fixed. Fixing forced read of initial keyframe when Motion DevTools is recording if keyframe is explicitly defined.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found