sass - New to scss, "rule is empty"? -


यह सुपर मूल है

  $ span1Width: 10; $ मार्जिन व्याप्ति: 5; @ मैक्सिन अवधि-चौड़ाई ($ spannr) {width: $ span1Width * $ spannr * 1%; * चौड़ाई: $ मार्जिन चौड़ाई * $ spannr -1 * 1%; } div {@ उपयोग की अवधि-चौड़ाई (10); }   

कोडपेन के साथ सीएसएस का विश्लेषण करते समय "खाली नियम" उत्पन्न होता है।

यदि आप मिक्सिक्स का उपयोग करने के तरीके के बारे में लिखते हैं तो आप उदाहरण देख सकते हैं:

  $ color: white; @ मिक्सीन रंग ($ रंग: नीला) {पृष्ठभूमि रंग: $ color; @सामग्री; सीमा रंग: $ रंग; } .colors {@ शामिल रंग {रंग: $ color; }}   

इसलिए आपको @ शामिल करना और इसके बजाय {} का उपयोग करना चाहिए। जैसे (इस उदाहरण में डिफ़ॉल्ट 5 का उपयोग करना):

  $ span1Width: 10; $ मार्जिन व्याप्ति: 5; @ मैक्सिन अवधि-चौड़ाई ($ spannr: 5) {चौड़ाई: $ span1Width * $ spannr * 1%; * चौड़ाई: $ मार्जिन चौड़ाई * $ spannr -1 * 1%; } Div {@ शामिल स्पैन-चौड़ाई {spannr: 10}; }   

आपको सही परिणाम देना चाहिए

Comments

Post a Comment

Popular posts from this blog

c++ - Cmake produces file extensions in static library archives -

c# - Roxy file manager in MVC doesn't accept session path -

c# - Check if a NumericUpDown has no value -