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

asp.net - Procedure or function "Procedure name" expects a parameter "Param name" which was not supplied occurs rarely -

jsp - No mapping found for HTTP request with URI with annotation config Spring MVC and Jetty -

sql server ce - Is there some way to make sqlce3.5 and 4.0 co-exist in the C# project -