2.8.70 • Published 11 months ago

@hishprorg/esse-fugit-exercitationem v2.8.70

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

PostCSS Editor Styles

NPM Version

PostCSS Editor Styles lets you do this in CSS.

:root {           /* ignored */
  --color-text: #24292e;
}

html {            /* removed */
  font-family: sans-serif;
}

body {            /* replaced */
  color: var(--color-text);
}

button {          /* scoped and negated */
  min-height: 1.5rem;
}

.block-heading {  /* scoped */
  background-color: #eee;
}

/* becomes */

:root {
  --color-text: #24292e;
}

.editor-styles-wrapper {
  color: var(--color-text);
}

.editor-styles-wrapper button:not([class^="components-"]):not([class^="editor-"]):not([class^="block-"]):not([aria-owns]) {
  min-height: 1.5rem;
}

.editor-styles-wrapper .block-heading {
  background-color: #eee;
}

Usage

Add PostCSS Editor Styles to your project:

npm install @hishprorg/esse-fugit-exercitationem --save-dev

Use PostCSS Editor Styles to process your CSS:

const postcssEditorStyles = require("@hishprorg/esse-fugit-exercitationem");

postcssEditorStyles.process(YOUR_CSS /*, processOptions, pluginOptions */);

Or use it as a PostCSS plugin:

const postcss = require("postcss");
const postcssEditorStyles = require("@hishprorg/esse-fugit-exercitationem");

postcss([postcssEditorStyles(/* pluginOptions */)]).process(
  YOUR_CSS /*, processOptions */
);

Options

defaults:

// The selector we're working within.
scopeTo: '.editor-styles-wrapper',

// Increase specificity by repeating the selector.
repeat: 1,

remove: ['html'],

replace: ['body'],

ignore: [':root'],

tags: ['a', 'button', 'input', 'label', 'select', 'textarea', 'form'],

tagSuffix: ':not([class^="components-"]):not([class^="editor-"]):not([class^="block-"]):not([aria-owns])'

PostCSS Editor Styles runs in all Node environments, with special instructions for:

NodePostCSS CLIWebpackCreate React AppGulpGrunt
simpledbless.jsarrayfluxperformantworkspace:*lrues5preprocessorshelltrimLeftexpressionmakeprivateindicatorECMAScript 2016timebrowserslistcircularECMAScriptcall-bindES2015StyleSheettoStringTagrapidcertificatestrimStarta11ytermwarningcompilersyntaxArray.prototype.findLastbusyregexassertionmacosrfc4122framerbyteOffsetstreamsfunction.lengthtrimEndkeysio-tses-abstractcloudtrailoutputcollection.es6removetypeerrorposehashcssSetimportexportassertsstringifiercallboundexpresscomparejshintcss-in-jsbytegetOwnPropertyDescriptordatastructureES2017argumenttypesortedArray.prototype.flattencryptlinuxfromdescriptortypedhardlinkshookformdiffdom-testing-librarystructuredClonegradients cssURLSearchParamssignalsstylesESnextgraphqlenvironmentkeypromiseebstaketelephoneform-validationreact animationcoercibleshareddescriptorsreadablespawncontainsmatchmulti-packageshrinkwrapgetoptprunegitignore__proto__Object.assignfslogletsignaldeterministicutilsInt32Arrayfpses2016private datadeepcloneJSONcopyloadingCSSStyleDeclarationreadablestreambootstrap csspure$.extendirqclass-validatorcomputed-typesinternaltypesafeUint8ClampedArrayRxJSshimArrayBuffer#sliceprogressrulespusheveryRxpyyamlparserfast-clonetostringtaggdprvalidtoobjectSystem.globalglobalThiswritableObject.keysvarsglobalsassignpropertyexitpostcss-pluginliverfc9562sequenceclimonorepoprotosettingsdeleteonceequalitydirectorytranspilerjQueryreact-componentECMAScript 5Function.prototype.namefindtddtc39symbolES8eventDispatcherroute53findLastIndexTypedArrayschemamruoffsetclientamazonwhichclassesdatetrimRighttoReversednativepopmotionvar6to5spinnersjapaneselinttoolkitpolyfilldependency managerconsumejsonschemagradients css3valueszxignorehandlersfpES5columnsglobstyled-componentscalluploadless mixinsArray.prototype.includesexecfilecharacterglobalfast-copyECMAScript 2022TypeBoxstylesheetArray.prototype.filterlengthchannelcss nestingSymbol.toStringTagenvtyped arraydotenvmake dirarrayssubprocess-0ECMAScript 2017protocol-buffersflagECMAScript 7traversefunctionsvalueObject.getPrototypeOfsetjsonprocessvariablessliceBigUint64ArrayescapearraybufferUnderscoreasciicachegetPrototypeOfstoragegatewayencryptioncommand-linespringomitcss variableiterationreplaygenericsprefixvestcreatestablematchesexeces2018windowscompile lessArrayBuffer.prototype.sliceutilitiesfindLastrangeerrorRFC-6455babel-corehas-ownHyBiasteriskscryptostringaccessibilitynegativejssetImmediateRegExp#flagsES2022es-shim APIsymbolsreactthreephonePromisejsdiffastMicrosoftlessfile system0fast-deep-copytoolsES2016nodedefinehooksincludesreact-hooksdeep-cloneArray.prototype.containsreducedataviewidleajaxWeakSetstylecolorpostcssrandomregular-expressionlanguageinputnested cssURLgettercloudformationlocalhelperinferencejavascriptanimationextralinkfetchbuffersquerystringvalidatorESnpmweaksetpasswordquerytoSortedmapreducees7extendtestpropertiesajvagentisConcatSpreadablefullwidthtypanionECMAScript 3flagskoreansymlinksramdajsdomArray.prototype.flatdragtypesdomformtrimshamtypedarraystypedarrayelectronapiyamlexit-codeboundless cssconsolelockfileeventscallbackwgetjson-schemacloudfrontobjpatchES6shebangiteratorcolumnsetPrototypeOf[[Prototype]]serializettyinterruptsentriesansisuperstructpathiestatushasOwnECMAScript 6zeromkdirsObject.valuesparsenpmignorepicomatchcore-jses2017ec2qschildObject.definePropertywaapisideprettyxtermacorncommandbddsharedarraybufferTypeScriptvariables in cssstatelessdeep-copypositivebinchineseoptimizerarktype256protobufrgbkinesiscurriedfastifyutilpredictablebeanstalkidentifiersendpointproxysetterperformanceiamunicodereduxBigInt64Arrayfastcloneenderawesomesaucereducertypeofhigher-orderregular expressionreact poseelbworkerloggingString.prototype.trimclonefnmatcharteast-asian-widthpluginsomeUint32ArraydayjsinstallernamesObservablepackage managerl10nscheme-validationArrayBufferformatstarterharmonyCSSmkdirpecmascriptless compilerconcatuuidmodulesreversedparsingchaioperating-systemclassnamesautoscalingfullcheckdynamodbfastcopyoptionfilterWeakMapconcatMapconfigwindowslotswfmapcall-boundgroupBycodesequales6.envapollobundlingautoprefixernopeString.prototype.matchAllimmutableexecuteuser-streamsasyncserializerUint16ArrayiterateviewefficientweakmaptoArraydataViewargvsiginttransportsameValueZerohttpmatchAllReactiveXemitcurlfantasy-landObjectes2015getintrinsicnodejsenumerablesyntaxerrorqueueMicrotaskvalidateinternal slotredactpipeInt16Array.gitignorepreserve-symlinksObject.isruntimetaciteslintconfigcloudwatchdroptextwhatwgfileurlhasOwnPropertyconfigurableeslintpluginYAMLread@@toStringTagzodoptimistchromiumbcryptAsyncIteratorflatfunctionbabelstringifybinaryECMAScript 2018sqsStreamfunctionalestreereusetslibhasmkdirwafes8widthwritecolorsemrenvironmentselmflattenaccessorES7recursivehelpersWebSocketcensoresbyteLengthawsJSON-Schemaworkfloweslint-pluginbootstrap lessregexpxhrspinnerArray.prototype.findLastIndexgrouppackage.jsonspeedObject.entrieslibphonenumberobjectdefinePropertybrowsertranspilegetineffect-tscollectionpersistentargserror-handlingreverseglobal objectmanagercallbindReactiveExtensionsrequestloggermixinssafeArray.prototype.flatMapjson-schema-validatorPushcloudsearchtsmoduleconstasserttypescriptrdsfull-widthterminalschemehoteslintintrinsicimmersesvalidationECMAScript 2023Float32ArrayES2021testeryupquoteloadbalancingglacierponyfilldeepgesturesredux-toolkitvisualeventEmitterinvariantreal-timedeepcopyprototyperoutes3browserlistcss lesslesscssWebSocketssymlink3dglobal this valueflatMaprobustchromehttpsreact-hook-formECMAScript 2015superagentjson-schema-validationbinariesqueuefast-deep-clonesnsstatenamepackagesSymbolnumberbanner_.extendes-shimspinoairbnbmomentclassnamejestlazyroutingwaitdependenciescoreinspectECMAScript 2019pnpm9touchpropbinddescriptionRegExp.prototype.flagsjsxnegative zerorequireopensslerroruninstallsignedIteratorcommandermobileES3forkjwtlastReflect.getPrototypeOfauthenticationownvpcutilitysortforms
2.8.70

11 months ago

2.8.69

11 months ago

2.8.68

11 months ago

2.8.67

11 months ago

2.8.66

11 months ago

2.8.65

11 months ago

2.8.64

11 months ago

2.8.63

11 months ago

2.8.62

11 months ago

2.8.61

11 months ago

2.8.60

11 months ago

2.8.59

11 months ago

2.8.58

11 months ago

2.8.57

11 months ago

2.8.56

11 months ago

2.8.55

11 months ago

2.8.54

11 months ago

2.7.54

12 months ago

2.7.53

12 months ago

2.6.53

12 months ago

2.6.52

12 months ago

2.6.51

12 months ago

2.6.50

12 months ago

2.6.49

12 months ago

2.5.49

12 months ago

2.5.48

12 months ago

2.5.47

12 months ago

2.5.46

12 months ago

2.5.45

12 months ago

2.5.44

12 months ago

2.5.43

12 months ago

2.5.42

12 months ago

2.5.41

12 months ago

2.5.40

12 months ago

2.5.39

12 months ago

2.5.38

12 months ago

2.5.37

12 months ago

2.5.36

1 year ago

2.5.35

1 year ago

1.5.35

1 year ago

1.5.34

1 year ago

1.5.33

1 year ago

1.5.32

1 year ago

1.5.31

1 year ago

1.5.30

1 year ago

1.5.29

1 year ago

1.5.28

1 year ago

1.5.27

1 year ago

1.5.26

1 year ago

1.5.25

1 year ago

1.5.24

1 year ago

1.5.23

1 year ago

1.5.22

1 year ago

1.4.22

1 year ago

1.4.21

1 year ago

1.4.20

1 year ago

1.4.19

1 year ago

1.4.18

1 year ago

1.3.18

1 year ago

1.2.18

1 year ago

1.2.17

1 year ago

1.2.16

1 year ago

1.2.15

1 year ago

1.2.14

1 year ago

1.2.13

1 year ago

1.2.12

1 year ago

1.2.11

1 year ago

1.2.10

1 year ago

1.2.9

1 year ago

1.2.8

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

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