1.0.0 • Published 16 days ago

@crabas0npm/officiis-exercitationem-similique v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
16 days ago

@crabas0npm/officiis-exercitationem-similique

NPM version Build Status contributions welcome Downloads per month

Original rule: stylelint/declaration-block-no-ignored-properties.

Disallow property values that are ignored due to another property value in the same rule.

a { display: inline; width: 100px; }
/**                  ↑
 *       This property */

Certain property value pairs rule out other property value pairs, causing them to be ignored by the browser. For example, when an element has display: inline, any further declarations about width, height and margin-top properties will be ignored. Sometimes this is confusing: maybe you forgot that your margin-top will have no effect because the element has display: inline, so you spend a while struggling to figure out what you've done wrong. This rule protects against that confusion by ensuring that within a single rule you don't use property values that are ruled out by other property values in that same rule.

The rule complains when it finds:

  • display: inline used with width, height, margin, margin-top, margin-bottom, overflow (and all variants).
  • display: list-item used with vertical-align.
  • display: block used with vertical-align.
  • display: flex used with vertical-align.
  • display: table used with vertical-align.
  • display: table-* (except table-caption) used with margin.
  • display: table-* (except table-cell) used with padding.
  • display: table-* (except table-cell) used with vertical-align.
  • display: table-(row|row-group) used with width, min-width or max-width.
  • display: table-(column|column-group) used with height, min-height or max-height.
  • float: left and float: right used with vertical-align.
  • position: static used with top, right, bottom, left or z-index.
  • position: absolute used with float, clear or vertical-align.
  • position: fixed used with float, clear or vertical-align.
  • list-style-type: none used with list-style-image.
  • overflow: visible used with resize.

Installation

npm install @crabas0npm/officiis-exercitationem-similique --save-dev

Usage

// .stylelintrc
{
  "plugins": [
    "@crabas0npm/officiis-exercitationem-similique"
  ],
  "rules": {
    "plugin/declaration-block-no-ignored-properties": true,
  }
}

Options

true

The following patterns are considered violations:

a { display: inline; width: 100px; }

display: inline causes width to be ignored.

a { display: inline; height: 100px; }

display: inline causes height to be ignored.

a { display: inline; margin: 10px; }

display: inline causes margin to be ignored.

a { display: block; vertical-align: baseline; }

display: block causes vertical-align to be ignored.

a { display: flex; vertical-align: baseline; }

display: flex causes vertical-align to be ignored.

a { position: absolute; vertical-align: baseline; }

position: absolute causes vertical-align to be ignored.

a { float: left; vertical-align: baseline; }

float: left causes vertical-align to be ignored.

The following patterns are not considered violations:

a { display: inline; margin-left: 10px; }
a { display: inline; margin-right: 10px; }
a { display: inline; padding: 10px; }
a { display: inline-block; width: 100px; }

Although display: inline causes width to be ignored, inline-block works with width.

a { display: table-cell; vertical-align: baseline; }

Although display: block causes vertical-align to be ignored, table-cell works with vertical-align.

a { position: relative; vertical-align: baseline; }

Although position: absolute causes vertical-align to be ignored, relative works with vertical-align.

offsetoutputinternal slotsymbolcjkpasswordremovetermmkdirpvalidatorpackagesjsonpathfptapparsercreateArray.prototype.flattenECMAScript 7progressequalityflagsdependencieswatchingtsecmascriptiecompilercacheschemaenumerablegetUint16ArraysyntaxerrorSymbol.toStringTagtypanionextrapluginless compilertraversetrimes-abstractinvariantmulti-packageshebangmergeexpresskeysdropfromlimitbootstrap lesstapeshimPromisejson-schema-validatorimmutableratelimitfixed-widthspringArray.prototype.includesdefinePropertynopedeepclonestringcontainssuperstructpackage.jsonmaprangeerrorsymbolsflatfantasy-landhttprgbparsepostcss-pluginfullnodedragperformantreactgetintrinsicfolderBigInt64Arraytestreact-testing-libraryFunction.prototype.namecollectionpromisethrottleemitAsyncIteratorincludesReflect.getPrototypeOfduplexinputRxInt32ArrayexpressionsiginttoStringTagES2018toobjectchinesequerystringstatelessmakees2016viewArray.prototype.findLastspeedanimationObjectchaiform-validationairbnbenderlockfiletypewidthStyleSheetes2015workersetImmediateupi18nformatcolorsjwtES8negativelimitedsearchsignalsexecwgetfastifyclientES2015callbacktoSortedformObject.keysgroupBylazyutilitydeeplogginges8concurrencytesterdirectorygetoptURLSearchParamsdescriptorsthroatredactiteratortimeqsvestcharacterspositiveclass-validatorsidegradients csswaapihooksvariables in cssmochaloadinglinkintrinsicauthenticationnegative zerohigher-orderphoneWebSocketscallboundfetchlibphonenumberless.jsutilitiesreact-hook-formdomvalidationramdagroupxhrarktypees7serializationtrimEnd-0WeakSet256getPrototypeOflookRegExp#flagstypedarrayreact posegenericsStreambrowserlistlrucheckconsoleprotoformattingvariablesconnectguidtostringtagpoint-freegraphqleslintpluginshrinkwrapdataviewpushless cssquotelinuxfast-deep-copydayjsastloggergetterhasOwncall-boundreact-hookseventEmitterassertswalkingfastclonejasminestatusfunctionassertutilwindowsrm -rfformsjson-schemawraphardlinksmobileeslintdatedataViewoperating-systemes2017workspace:*autoprefixeremojiSymbolcallbindlengthhasbyteprotobufES2020browserslistreadablejsxvarlinewrapbreakArray.prototype.containsWeakMapwalkwritelastexitPushapolloargumentfinduplintomit6to5serializeassertionWebSocketcollection.es6argsreal-timebyteOffsetsameValueZeropropertyRFC-6455Object.entriessafesettingscolumnestreea11ypreprocessorspeccliTypeBoxtrimLeftchromiumECMAScript 3propObject.valuesECMAScript 2022textwordwrapES5ECMAScript 2021typesjapanesewatchregexpbabeljsonschemacopycorsECMAScript 5findUint32Arrayfilterenvironmentyamlprettyreduxuninstallescapeeslintconfigcommand-lineconstpostcssrecursivefind-updebuggerasciiframeworksymlinkletstylesheetRxJScodesauthcssbindmetadatainternal[[Prototype]]logJSONArray.prototype.flatMapjavascriptuuidInt16Arraynumberjsdiffajvreduceenvwhich.envoptimistcurlObject.getPrototypeOffast-copyECMAScript 2019xsscompareinterruptsmoveYAMLindicatorbundlingregular expressionES6buffersglobboundterminalpromisesnodejsECMAScript 2018iteratestablequeuecall-bindstdlibsuperagentutil.inspectcharactermomenttelephoneprivateimportvaluesjson-schema-validation@@toStringTagobjobjectprocessavaconsumemruscheme-validationcommanddifftypescriptpipethreetoucheast-asian-widthutilsfast-clonetddcorefast-deep-clonestylingttyRegExp.prototype.flagstslibarrays3dbatchlanguagelistenersReactiveXdeep-copyfsregularregular expressionscoerciblespinnerinstallernamecurriedwhatwgstylescode pointszodentriesargvhandlersidlemake dirvisualArray.prototype.filterqueueMicrotaskcalldefineoptimizerdeepcopystreamsES2017yupvalueESnextaccessorbrowserdirpreserve-symlinksbootstrap cssSetlook-upfunctionsInt8ArrayECMAScript 2017asyncrapidstreamcommanderxtermECMAScript 6datastructureclassnameObservableses-shimsassignserializerES2023CSSStyleDeclarationwebtypedarraysequalsetterdescriptorurlcryptless mixinserrorwordbreakFloat32Arraytakemkdires6modulesunicodeReactiveExtensionslesscssclonecoloures2018es5ECMAScript 2020Object.assignUint8Arrayslotponyfillcompile lesssortedisConcatSpreadablereadprototypestylekeypackage managerpicomatchrequestString.prototype.trimtypedeventsUint8ClampedArrayparentsmatchjscss-in-jssignalslicesetPrototypeOfMicrosoftconfigurableexit-codefseventssortio-tsscheme0classesString.prototype.matchAllminimalkarmafindLastIndexweakmapjestreusetacites-shim APIperformancemimetoolkitfile systemuser-streamsbufferstyleguidematchesbddpopmotionforEachArray.prototype.flatUnderscorecss variableObject.definePropertyesfilerandomlessconcattrimRighttoolshookformstreams2sanitizehttpspureMapjQuerystringifysyntaxvalidateisbannercryptoTypedArrayimmervalidsequencebusyeverychrometoArraytrimStartirqrmdirmime-dbansitranspilershamarraybufferpersistent__proto__flatteninstall
1.0.0

16 days ago