Open fessehaye opened 3 years ago
Made this into an epic Simon!
@fessehaye are the spacing units in the ticket description still valid? If not, could you please help update them? Thank you!
➤ Simon Acosta Torres commented:
Tyler Denton We have quite a few issues regarding this migration, which involve https://mozilla-hub.atlassian.net/browse/TP1-244 ( https://mozilla-hub.atlassian.net/browse/TP1-244|smart-link ), https://mozilla-hub.atlassian.net/browse/TP1-245 ( https://mozilla-hub.atlassian.net/browse/TP1-245|smart-link ), https://mozilla-hub.atlassian.net/browse/TP1-246 ( https://mozilla-hub.atlassian.net/browse/TP1-246|smart-link ), TPI1-247 and https://mozilla-hub.atlassian.net/browse/TP1-248 ( https://mozilla-hub.atlassian.net/browse/TP1-248|smart-link ).
Is any of this work something you would like to handle this year? Seems like a pretty extensive update in the midst of other higher priority extensive changes pertaining the brand.
Once we decide on what we are using some additional tasks that toward intergrating the new framework:
mofo-bootstrap
from our stylings and packagesTips for converting existing styles to tailwind
Converting spacing units
Use this table when converting margin/padding/widths
Converting column classes
When you replace a class like
col-sm-4
, use tailwind breakpoints to replace the middle section then usetw-w-[col]/12
to replace the width and then addtw-px-8 tw-relative
to replace the padding/positionRemoving SASS files
If the component you are working on does not have a wagtail template, it might be best to create a tailwind component using the plugin API in CSS-in-JS
https://tailwindcss.com/docs/adding-custom-styles#writing-plugins
You can also use
tailwind.component.js
for further examples on the how we did it on the repoWagtail block issue
You need to make sure there is a space between any tailwind classes and wagtail blocks
This would not parse properly:
tw-w-[120px]{% endif %}
Reverse engineering bootstrap classes and elements
Due to the amount of mixins and sass functions with bootstrap usage, I would not always recommend try to step through the sass files and it would easier to step over if you just inspected the elements with dev-tools
┆Issue is synchronized with this Jira Story