home.social

#techfedihelp — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #techfedihelp, aggregated by home.social.

  1. Hey nerds

    Is there a way to convert this sass function so it can handle both a single and multiple properties?

    @function pxToRem($pxValue) {
        @return math.div($pxValue, 16px) * 1rem;
    }

    When I use it I call it like so:

    @Include mixin.spacing('margin', 10px);

    Which converts any px input to rem, no problem, but it's a pain if I want to write out

    @Include mixin.spacing('margin', 10px 20px 0 10px);

    Or similar, trying to work out if I can do everything in a single function.

    #SASS #SCSS #CSS #FrontEnd #FE #WebDev #FediHelp #FrontEndDevelopment #TechFediHelp

  2. Hey nerds

    Is there a way to convert this sass function so it can handle both a single and multiple properties?

    @function pxToRem($pxValue) {
        @return math.div($pxValue, 16px) * 1rem;
    }

    When I use it I call it like so:

    @Include mixin.spacing('margin', 10px);

    Which converts any px input to rem, no problem, but it's a pain if I want to write out

    @Include mixin.spacing('margin', 10px 20px 0 10px);

    Or similar, trying to work out if I can do everything in a single function.

    #SASS #SCSS #CSS #FrontEnd #FE #WebDev #FediHelp #FrontEndDevelopment #TechFediHelp

  3. Hey nerds

    Is there a way to convert this sass function so it can handle both a single and multiple properties?

    @function pxToRem($pxValue) {
        @return math.div($pxValue, 16px) * 1rem;
    }

    When I use it I call it like so:

    @Include mixin.spacing('margin', 10px);

    Which converts any px input to rem, no problem, but it's a pain if I want to write out

    @Include mixin.spacing('margin', 10px 20px 0 10px);

    Or similar, trying to work out if I can do everything in a single function.

    #SASS #SCSS #CSS #FrontEnd #FE #WebDev #FediHelp #FrontEndDevelopment #TechFediHelp

  4. Hey nerds

    Is there a way to convert this sass function so it can handle both a single and multiple properties?

    @function pxToRem($pxValue) {
        @return math.div($pxValue, 16px) * 1rem;
    }

    When I use it I call it like so:

    @Include mixin.spacing('margin', 10px);

    Which converts any px input to rem, no problem, but it's a pain if I want to write out

    @Include mixin.spacing('margin', 10px 20px 0 10px);

    Or similar, trying to work out if I can do everything in a single function.

    #SASS #SCSS #CSS #FrontEnd #FE #WebDev #FediHelp #FrontEndDevelopment #TechFediHelp

  5. Hey nerds

    Is there a way to convert this sass function so it can handle both a single and multiple properties?

    @function pxToRem($pxValue) {
        @return math.div($pxValue, 16px) * 1rem;
    }

    When I use it I call it like so:

    @Include mixin.spacing('margin', 10px);

    Which converts any px input to rem, no problem, but it's a pain if I want to write out

    @Include mixin.spacing('margin', 10px 20px 0 10px);

    Or similar, trying to work out if I can do everything in a single function.

    #SASS #SCSS #CSS #FrontEnd #FE #WebDev #FediHelp #FrontEndDevelopment #TechFediHelp