In [the original post](/blog/rebuilding-bartik-with-vuejs-tailwind-css) I detailed how I built [a clone of Drupal’s Bartik theme][netlify] with [Vue.js][vuejs] and [Tailwind CSS][tailwind]. This follow-up post details some updates that I’ve made to it since then.
During the first version of the page, my thoughts were to not edit the Tailwind configuration, however I changed my mind on this whilst working on the subsequent updates and did make some changes and customisations to the `tailwind.js` file.
By default, Tailwind includes a full colour palette including colours such as yellows, oranges, reds that weren’t being used in this page so they were removed. This makes the file more readable as well as reduces the number of classes that Tailwind generates.
Whist I was changing the colours, I also took the opportunity to tweak the values of the remaining colours to more closely match Bartik’s original colours.
I also added a `black-60` class which uses [RGBA](https://css-tricks.com/the-power-of-rgba) to provide a semi-transparent background. I used this when adding the [skip to main content link](#adding-the-skip-to-main-content-link).
I added a `style` section within `Welcome.vue`, and added some default styling for links based on their location on the page - [extracting some Tailwind components](https://tailwindcss.com/docs/extracting-components).
Within the `style` section, I’m able to use Tailwind’s custom `@apply` directive to inject it’s rules into more traditional CSS, rather than needing to add them onto every link.
As well as being able to extract re-usable components within Tailwind, the same can be done within Vue. As the page could potentially have multiple sidebar blocks, I extracted a `SidebarBlock` component which would act as a wrapper around the block’s contents.
The component provides the wrapping div and the appropriate classes in a single easy-to-maintain location, and [uses a slot](https://vuejs.org/v2/guide/components-slots.html) as a placeholder for the main content.
One thing [that was missing](https://github.com/opdavies/rebuilding-bartik/issues/1) was the 'Skip to main content link'. This an accessibility feature that allows for users who are navigating the page using only a keyboard to bypass the navigation links and skip straight to the main content if they wish by clicking a link that is hidden and only visible whilst it’s focussed on.
I initially tried to implement the same feature on this website using [Tailwind’s visually hidden plugin](https://www.npmjs.com/package/tailwindcss-visuallyhidden) which also contains a `focussable` class, though I wasn’t able to style it the way that I needed. I created my own [Tailwind skip link plugin](https://www.npmjs.com/package/tailwindcss-skip-link) and moved the re-usable styling there.
I added only the page-specific styling classes to the link (as well as the `skip-link` class that the plugin requires) as well as my own focus state to the skip link that I did within the `style` section of `App.vue`.
![The Bartik clone with the skip to main content link visible](/images/blog/rebuilding-bartik-vue-tailwind-part-2/skip-link.png){.border}
## Adding the DrupalMessage component
I also added a version of Drupal’s status message. For readability, this is contained within it’s own component, `DrupalMessage.vue`, though it contains only a static template and has no `script` or any of it’s own data.
and <ahref="https://tailwindcss.com"class="text-blue-dark hover:text-blue no-underline border-b border-dotted hover:border-solid border-blue-dark">Tailwind CSS</a>.
</p>
</div>
</div>
</template>
```
I did need to make one change to the `tailwind.js` file - within `modules` I needed to enable the `borderStyle` module for hover and focus states in order for Tailwind to generate the additional classes.
```js
modules: {
// ...
borderStyle: ['responsive', 'hover', 'focus'],
// ...
}
```
The message is included within the Welcome component by including the `<drupal-message />` element, though rather than importing it there, it’s registed as a global component so it would be available to any other components that could be added in the future.