I need to include bootstrap-rtl LESS files to my theme when using fa_IR locale.

So I did:

  1. Add those downloaded LESS files to: app/design/frontend/<Vendor>/<Theme_Name>/web/i18n/fa_IR/css/source/bootstrap-rtl.
  2. Import the main LESS file (bootstrap-rtl.less) in _extend.less at same directory above: @import 'bootstrap-rtl/bootstrap-rtl.less'
  3. Because this bootstrap-rtl package need bootstrap variable I copied bootstrap LESS file in same directory above, and changed import line:8 in bootstrap-rtl.less to : @import "../bootstrap/_variables.less". So now it can access to bootstrap variable.

The Problem Is:

when using this command to deploy static contents:

php bin/magento setup:static-content:deploy

It will return some error (58 Error) like this:

variable @grid-float-breakpoint is undefined in file C:/xampp7/htdocs/Magento_2.1.9/var/view_preprocessed/css/frontend/<Vendor>/<Theme_Name>/fa_IR/css/source/bootstrap-rtl/type-rtl.less ...

and these styles will not compile at the end.

You Should Know:

  • My theme inherits from another theme that using bootstrap as External UI Library source, So is there any conflict in bootstrap styles with my theme and it's parent theme?
  • I'm using Magento 2.1.9 with PHP 7.0.22 and XAMPP 3.2.2.

Thanks in advance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.