Page MenuHomePhabricator

Export "less mixin" in Codex build to enable usage from end user
Closed, ResolvedPublic

Description

As a user of the Codex Library, I would like to have access to the LESS mixins available within the repository, so that I can easily solve problems CSS problems.

Example

The use of a custom input with a Menu component requires some specific border-bottom being applied to the custom input. This exists in the form of a mixin. Likewise, the use of an Icon within a text field also has a mixin to handle its placement

    1. Acceptance criteria
  • Add rules to vite build so that it "copies" the LESS mixin folder in the dist folder.
  • Change all "menu" docs examples to use the available mixin (search for TODO(T308124) )
  1. NOTE: if we do not want to do this task, we should remove the "TODO(T308124) " comment in the code

Event Timeline

egardner claimed this task.
egardner subscribed.

We have formally adopted this approach in Codex going forward, see https://doc.wikimedia.org/codex/main/using-codex/adrs/04-adr-less-mixins.html

Right now only "public" mixins will be copied over – we are currently working on one for the Link component this way (does not need JS) – see T316895: Design and build Link Component MVP and https://gerrit.wikimedia.org/r/c/design/codex/+/829238. Some mixins will remain internal to Codex.

If a specific public mixin is needed in the future, feel free to file a task.