CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-emotion--unitless

An object of CSS properties that don't accept values with units

92

0.92x

Quality

Pending

Does it follow best practices?

Impact

92%

0.92x

Average score across 7 eval scenarios

Overview
Eval results
Files

rubric.jsonevals/scenario-2/

{
  "context": "This criteria evaluates how well the engineer uses the @emotion/unitless package to determine which CSS properties accept unitless numeric values and correctly format style values based on that information.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Import unitless object",
      "description": "Correctly imports the default export from @emotion/unitless package",
      "max_score": 10
    },
    {
      "name": "Property lookup logic",
      "description": "Uses the unitless object to check if a property is unitless by accessing unitless[property] and comparing to 1 or checking for undefined",
      "max_score": 25
    },
    {
      "name": "Conditional unit addition",
      "description": "Correctly adds 'px' suffix to numeric values only when the property is not in the unitless object (unitless[property] !== 1 or is undefined)",
      "max_score": 20
    },
    {
      "name": "Zero value handling",
      "description": "Correctly handles zero values by not appending units (value === 0 check)",
      "max_score": 15
    },
    {
      "name": "Unitless property handling",
      "description": "Returns numeric values unchanged for properties that are in the unitless object (flex, opacity, zIndex, lineHeight, etc.)",
      "max_score": 15
    },
    {
      "name": "Style object processing",
      "description": "Iterates through style object entries and applies the unitless lookup logic to each property-value pair in the processStyles function",
      "max_score": 15
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-emotion--unitless

tile.json