You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
actuellement ce n'est pas supporté dans notre mixin. Il faudrait la modifier la fonction clamp pour le calcul de la slope pour que le max - min prenne effectivement le plus grand nombre et modifier aussi dans le return pour que le premier soit bien le plus petit et le deuxième le plus grand
module.exports={clamp(mixin,property,minPx,maxPx,minBp,maxBp){consttoRems=(px)=>{returnpx/16;};constrnd=(number,places=0)=>{letn=1;if(places>0){for(leti=1;i<=places;i++){n=n*10;}}returnMath.round(number*n)/n;};// Remove px from breakpointsconststrippedMinBp=minBp.replace(/px/g,'');conststrippedMaxBp=maxBp.replace(/px/g,'');constslope=(minPx-maxPx)/(strippedMinBp-strippedMaxBp);constslopeVw=rnd(slope*100,2);constinterceptRems=rnd(toRems(minPx-slope*strippedMinBp),2);return{[property]: `clamp(${maxPx}px, ${slopeVw}vw + ${interceptRems}rem, ${minPx}px)`,};},};
Make the clamp mixin handle an inverted slope
example:
@mixin clamp width, 65, 50, $min-bp, $max-bp;
The text was updated successfully, but these errors were encountered: