Closed lostie closed 5 years ago
Hi Sergio,
Thanks for raising this. I've been able to reproduce this – it looks like that failing include is actually trying to import this file from Elements.
However, if you include the component parts of Frontend Toolkit and Elements as per the example in the readme it should work fine – with one exception:
@import 'elements/forms/form-block-labels'
@import 'elements/forms/form-date'
@import 'elements/forms/form-validation'
should be
@import 'elements/forms/form-date';
@import 'elements/forms/form-multiple-choice';
@import 'elements/forms/form-validation';
I'll raise a PR to update those docs now, and that should work fine for you. In the meantime, I'll try and dig in and work out why @import govuk-elements
doesn't work.
I'm closing this as I believe it was addressed by #34.
The following file that is included in the bundled gem call the following:
https://github.com/alphagov/govuk_elements_rails/blob/a15b523f39c226e40ffea9e7198ba9bed2d0431c/vendor/assets/stylesheets/_govuk-elements.scss#L1
but when the bundled file
_govuk-elements.scss
executes the following:It can't successfully load it, as neither this gem includes it, neither the govuk_frontend_toolkit_gem.
For context, I've noticed this while setting the following in my main
scss
file for my Rails app:The actual error I got was the following:
Would it be possible to add the
frontend-toolkit
file to its gem so it can be loaded correctly? (I've noticed that in dev mode the gem seems to work as the source code has a git submodule linked to the actualgovuk_elements
source code where thefrontend-toolkit
file does exist.