File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 167167 "contributors" : [],
168168 "code" : " @mixin line-clamp($number) {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: $number;\n overflow: hidden;\n }\n "
169169 },
170+ {
171+ "title" : " Function to convert px to rem" ,
172+ "description" : " This function will convert px values to rem values." ,
173+ "author" : " gihanrangana" ,
174+ "tags" : [
175+ " sass" ,
176+ " function" ,
177+ " pixel" ,
178+ " rem" ,
179+ " px-to-rem" ,
180+ " css"
181+ ],
182+ "contributors" : [],
183+ "code" : " @function px-to-rem($px, $base: 16px) {\n @return ($px / $base) * 1rem;\n }\n\n // Usage\n div {\n font-size: px-to-rem(12px); // Output: 0.75rem\n padding: px-to-rem(16px); // Output: 1rem\n margin: px-to-rem(32px) // Output 2rem\n }\n "
184+ },
170185 {
171186 "title" : " Text Gradient" ,
172187 "description" : " Adds a gradient color effect to text." ,
You can’t perform that action at this time.
0 commit comments