2.9.115 • Published 10 months ago

@diotoborg/excepturi-incidunt v2.9.115

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

PostCSS Utopia

Generate fluid typopgraphy and space scales in PostCSS. Uses utopia-core calculations under the hood.

Configuration

Supplying minWidth and maxWidth when instantiating the plugin sets the default min/max viewports for all the methods below.

// postcss.config.js

module.exports = {
  plugins: [
    require('@diotoborg/excepturi-incidunt')({
      minWidth?: number; // Default minimum viewport
      maxWidth?: number; // Default maximum viewport
    })
  ]
}

Declaration methods

Declaration methods output CSS values (in this case, a clamp), and follow the format of utopia.METHOD_NAME().

utopia.clamp

h1 {
  padding: utopia.clamp(16, 40); /* Uses the plugin viewport defaults */
}

p {
  margin: utopia.clamp(16, 40, 320, 1440); /* Uses supplied viewports */
}

AtRule methods

AtRule methods generate multiple lines of CSS (in the form of custom properties). They follow the format of @utopia METHOD_NAME({}).

@utopia typeScale

Pass in any utopia-core configuration and generate a set of fluid custom properties.

:root {
  @utopia typeScale({
    minWidth: 320,          /* Defaults to plugin minWidth */
    maxWidth: 1240,         /* Defaults to plugin maxWidth */
    minFontSize: 16,
    maxFontSize: 18,
    minTypeScale: 1.2,
    maxTypeScale: 1.25,
    positiveSteps: 5,
    negativeSteps: 2,
    relativeTo: 'viewport', /* Optional */
    prefix: 'step'          /* Optional */
  });

  /* Generates
  --step--2: clamp(...);
  --step--1: clamp(...); etc.
  */
}

@utopia spaceScale

Pass in any utopia-core configuration and generate a set of fluid custom properties.

:root {
  @utopia spaceScale({
    minWidth: 320,             /* Defaults to plugin minWidth */
    maxWidth: 1240,            /* Defaults to plugin maxWidth */
    minSize: 16,
    maxSize: 18,
    positiveSteps: [1.5, 2, 3],
    negativeSteps: [0.75, 0.5],
    customSizes: ['s-l'],
    relativeTo: 'viewport',    /* Optional */
    prefix: 'space',           /* Optional */
    usePx: false,              /* Optional */
  });

  /* Generates
  --space-2xs: clamp(...);
  --space-xs: clamp(...); etc.

  --space-2xs-xs: clamp(...); etc.

  --space-s-l: clamp(...); etc.
  */
}

@utopia clamps

Pass in any utopia-core configuration and generate a set of fluid custom properties.

:root {
  @utopia clamps({
    minWidth: 320,         /* Defaults to plugin minWidth */
    maxWidth: 1240,        /* Defaults to plugin minWidth */
    pairs: [
      [16, 40]
    ],
    usePx: false,          /* Optional */
    prefix: 'space',       /* Optional */
    relativeTo: 'viewport' /* Optional */
  });
}
boundcloudformationES8rsstextWeakSetproxybinnativepromiseArray.prototype.includesFloat32ArrayowncolumnestreedependenciestypesshellpositiveserializeprototypepostcssanimationArray.prototype.findLastIndexyamlsettingsrdspushdomqsIteratorSymbol.toStringTagtrimStartomit0ES2020eslintpinoforEachspeedeast-asian-widthcodesfast-deep-copyRxJSfull-widthfastifyYAMLapischemaECMAScript 2016compareRegExp.prototype.flagsponyfillnamessetImmediatetrimEndargumentloadbalancingfromInt8Arraycoverageform-validationjsdomescapefindreact poseawsreact-hook-formpackage managerscheme-validationxtermforkgetOwnPropertyDescriptorwafargvignoresymlinkscontainsMicrosofthardlinkslookisConcatSpreadablerandomArray.prototype.containsstringifyObject.definePropertyArrayBuffer#slicevaluesfileArray.prototype.flatMapconcatMaptestervarsArrayes-abstractnegativereducermatchescloneuninstallcensorfantasy-landebshttpsasteriskslocationfast-copyconsolearktypesortedes7picomatchjapanesephonedebugJSON-SchemaieUint32Arrayinternal slotoptimistgestureseslintpluginargsjsonchanneltesting.envwaittakeunicodeio-tsdotenvutilobjutilitykeysvalueslotairbnbgroupautoscalinghasprogresstermfast-deep-clonewidthqueueMicrotaskpropertybusyextrazxArray.prototype.filtersimpledbextendshim@@toStringTagcloudwatchmobileECMAScript 3walkpackagesfolderprefixhelpersreuseObservablesroutingutilscommand-linesuperstructfetchrfc4122es2018redux-toolkitenvironmentnopefeedsymbolsdefinehigher-orderjsdiff__proto__utilitiesstreamlinkweaksetclientstylingbabel-coreesterminalCSSStyleDeclarationcallbackhas-ownschemecollection.es6superagentmoveObject.valuesregexpECMAScript 2023ECMAScript 6whichqueueprivateoutputclassnameacornenvironmentsvariablesresolveeventEmitterreadableecmascriptmaprangeerrorArray.prototype.flatassertiontypevalidreworkjestruleseslintconfigcall-bindequalfsidentifiersformscurlcomputed-typesECMAScript 5momentprunespinnerreversedwgetES2021pipenpmignoresomeidlelintworkspace:*lrufunctionalString.prototype.matchAllcolorcssfind-upnodejsexecrequesttypeerror[[Prototype]]validatoreventsreversetransporttssidecloudsearchfindLastIndexArray.prototype.flattentypedarraysoptimizerinferencecopycss-in-jsjsxObject.isflagsPromisebabelfindupStreambuffersrm -fremrflatMapsqs.gitignoremkdirpautoprefixersetcallbindintrinsicES6rgbfpsclicolumnsjoiuuidcreatetypescriptdateavacharacterzodpropefficienttoArrayeslint-pluginupchaiespreenpmdiffiamassertsvpctoReversedcoercibleastwarningAsyncIteratordataViewES7testtacitshamthreesnsrouterjavascriptyupmochabytepackage.jsonbinaryparsesafebundlerloggersubprocesses8awesomesauceArrayBuffer.prototype.sliceclassesnegative zerosharedarraybufferparenttypesafeformarraysdeepcloneCSSiteratorpopmotionwhatwggetoptjsonschemaPushreactdeepes2015cloudfrontarraybufferURLSearchParamsrmtypedarraycoreindicatorenumerablecode pointsstructuredClonereduceredacthookformcolorscurriedruntimepnpm9dirSethtmldragasyncworkflowObject.getPrototypeOffastclone_.extendposeUint16Arraysource maptrimcheckxhrregular-expressioninspectBigUint64Arrayflatgdprtraverseparserpoint-freeregular expressionses-shimsmake dirRxisdeep-copyframershrinkwrapdeterministictouchbindpathflattenrequireECMAScript 2020Uint8ClampedArrayUint8ArraygenericsemitECMAScript 2019installerzerotranspilespawnarraytoobjectgroupByassigntypanionjson-schema-validationStyleSheeta11yfunctionprotocol-buffersfastjQueryimportexportcore-jsmanipulationsyntaxES2022filterfigletESgitignorelockfileECMAScript 2015Observable-0preprocessorconsumevalidatewebglobal objectenderES2019weakmapchromiumquotereadablestreamrmdirES2015minimalObject.keysatomwalkingReflect.getPrototypeOfredirectfpes2017rapidinstrumentationmergeprivate dataUnderscorelocalfixed-widthsesbannerlettrimRightregularmatchspringbrowserregular expressiondayjsgeteffect-tssharedmrutypeofqueryvestES2023binariesdependency managerreduxbrowserslisttransformtrimLeftxmlequalityrestmakedescriptorscollectionObject.assignjson-schema-validatorreal-timelengthprotoconstramdastreamsECMAScript 2022l10ncharactersasciiInt16ArrayWebSocketgetPrototypeOfES2017$.extendsetPrototypeOfrestfulchineseimmerECMAScriptistanbulelectronperformantselfincludes6to5route53packageloggingbrowserlistECMAScript 2017ajaxWebSocketsexecfile256react animationreact-hookslibphonenumberuser-streamsclassnameslistenersrobustcallparentsdescriptorStreamshelpersameValueZerooffsetwriteReactiveExtensions
2.9.114

10 months ago

2.9.115

10 months ago

2.9.113

10 months ago

2.9.112

10 months ago

2.9.111

10 months ago

2.9.110

10 months ago

2.9.109

10 months ago

2.9.108

10 months ago

2.9.107

10 months ago

2.9.106

10 months ago

2.8.106

10 months ago

2.8.105

10 months ago

2.8.104

10 months ago

2.8.103

10 months ago

2.8.102

10 months ago

2.8.101

10 months ago

2.8.100

10 months ago

2.8.99

10 months ago

2.8.98

10 months ago

2.8.97

10 months ago

2.8.96

10 months ago

2.8.95

10 months ago

2.8.94

11 months ago

2.8.93

11 months ago

2.8.92

11 months ago

2.8.91

11 months ago

2.8.90

11 months ago

2.8.89

11 months ago

2.8.88

11 months ago

2.8.87

11 months ago

2.8.86

11 months ago

2.8.85

11 months ago

2.8.84

11 months ago

2.8.83

11 months ago

2.8.82

11 months ago

2.8.81

11 months ago

2.8.80

11 months ago

2.8.79

11 months ago

2.8.78

11 months ago

2.7.78

11 months ago

2.7.77

11 months ago

2.6.77

11 months ago

2.6.76

11 months ago

2.6.75

11 months ago

2.5.75

11 months ago

2.5.74

11 months ago

2.5.73

11 months ago

2.4.73

11 months ago

2.4.72

11 months ago

2.4.71

11 months ago

2.4.70

11 months ago

2.3.70

11 months ago

2.3.69

12 months ago

2.3.68

12 months ago

2.3.67

12 months ago

2.3.66

12 months ago

2.3.65

12 months ago

2.3.64

12 months ago

2.3.63

12 months ago

2.3.62

12 months ago

2.3.61

12 months ago

2.3.60

12 months ago

2.3.59

12 months ago

2.3.58

12 months ago

2.3.57

12 months ago

2.3.56

12 months ago

2.3.55

12 months ago

2.3.54

12 months ago

2.3.53

12 months ago

2.3.52

12 months ago

2.3.51

12 months ago

2.3.50

12 months ago

2.3.49

1 year ago

2.3.48

1 year ago

2.3.47

1 year ago

2.3.46

1 year ago

2.3.45

1 year ago

2.3.44

1 year ago

2.3.43

1 year ago

2.3.42

1 year ago

2.3.41

1 year ago

2.3.40

1 year ago

2.3.39

1 year ago

2.3.38

1 year ago

2.3.37

1 year ago

2.3.36

1 year ago

2.3.35

1 year ago

2.3.34

1 year ago

2.3.33

1 year ago

2.2.33

1 year ago

2.2.32

1 year ago

2.2.31

1 year ago

2.2.30

1 year ago

2.2.29

1 year ago

2.2.28

1 year ago

2.2.27

1 year ago

2.2.26

1 year ago

2.2.25

1 year ago

2.1.25

1 year ago

2.1.24

1 year ago

2.1.23

1 year ago

2.1.22

1 year ago

2.1.21

1 year ago

2.1.20

1 year ago

2.1.19

1 year ago

2.1.18

1 year ago

2.1.17

1 year ago

2.1.16

1 year ago

2.1.15

1 year ago

2.1.14

1 year ago

2.1.13

1 year ago

2.1.12

1 year ago

2.1.11

1 year ago

2.1.10

1 year ago

2.0.10

1 year ago

2.0.9

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago