1

I am trying to change bootstrap.min.css using VQMOD in following way and it does not work.

Is there any way to fix this other than building a duplicate bootstrap.min.css file?

 <?xml version="1.0" encoding="UTF-8"?>
  <modification>
   <id>Adds custom color link in bootstrap</id>
   <version>1.0</version>
   <vqmver>2.5.1</vqmver>
   <author>Bubba</author>
    <file name="catalog/view/javascript/bootstrap/css/bootstrap.min.css">
     <operation info="Replace link colors">
       <search position="replace"><![CDATA[
       a{color:#428bca;text-decoration:none}a:hover,a:focus{color:#2a6496;text-decoration:underline}
       ]]></search>
       <add><![CDATA[
       a{color:#855e42;text-decoration:none}a:hover,a:focus{color:#000000;text-decoration:underline}
       ]]></add>
   </operation>
  </file>
</modification>
amphetamachine
  • 27,620
  • 12
  • 60
  • 72
Bubba Yakoza
  • 749
  • 2
  • 9
  • 17
  • Apparently not. I am trying to vQmod some styles into my theme css file and its not showing up :c – iiminov Feb 17 '15 at 22:10

1 Answers1

2

According to this article vQmod has a limitation which files can be modified.

You can't edit everything - CSS, JS and standalone files. Stylesheets and JavaScripts are handled by the browser, so you cannot edit them via a vQmod by default.

Unfortunately that leaves us with two choices:

  1. modify the original file
  2. adjust CSS/JS with inline code blocks
    • <style type="text/css">
    • <script type="text/javascript">
  3. as @BubbaYakoza pointed out another way is to use vQmod to modify <head> tag to replacing reference to modified file
    • as long as your <head> is defined outside of index.php that is
iiminov
  • 969
  • 1
  • 15
  • 34
  • 1
    There is another way I found meanwhile. Rather than modifying original file. Use VQMOD to remove and add new link to your modified CSS file. Thanks for your answer anyway. – Bubba Yakoza Feb 18 '15 at 17:54
  • There's one more way of doing it. You can have a separate stylesheet file with all the CSS rules that needs to be overwritten, and simply call it AFTER the original `bootstrap.min.css`, so it would overwrite its values, without actually modifying the file itself. – Tibor B. Mar 03 '15 at 12:05
  • @TiborB. while that is true depending on extend and complexity of changes that need to be made to the stylesheet sometimes it is just easier to replace than to rewrite stylesheets. But it is a valid point. – iiminov Mar 03 '15 at 15:55