Merge pull request #769 from tonio/noimportant
Avoid !important when not needed. img.olTileImage is precise enough to override boostrap’s rule.
This commit is contained in:
@@ -53,10 +53,12 @@
|
|||||||
Note that the OpenLayers stylesheet is loaded before
|
Note that the OpenLayers stylesheet is loaded before
|
||||||
Bootstrap. The Bootstrap CSS sets the maximum width for
|
Bootstrap. The Bootstrap CSS sets the maximum width for
|
||||||
images to be 100% (of their containing element).
|
images to be 100% (of their containing element).
|
||||||
|
</p>
|
||||||
<pre><code>img {
|
<pre><code>img {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
<p>
|
||||||
This causes problems for images that you might want to be
|
This causes problems for images that you might want to be
|
||||||
bigger than their containing element (e.g. big tile in small
|
bigger than their containing element (e.g. big tile in small
|
||||||
map viewport). To overcome this, the OpenLayers CSS
|
map viewport). To overcome this, the OpenLayers CSS
|
||||||
@@ -64,10 +66,12 @@
|
|||||||
not loading the OpenLayers default CSS or are having trouble
|
not loading the OpenLayers default CSS or are having trouble
|
||||||
with tile sizing and Bootstrap, add the following to your
|
with tile sizing and Bootstrap, add the following to your
|
||||||
markup:
|
markup:
|
||||||
<pre><code><style>
|
|
||||||
max-width: none !important;
|
|
||||||
</style><code></pre>
|
|
||||||
</p>
|
</p>
|
||||||
|
<pre><code><style>
|
||||||
|
img.olTileImage {
|
||||||
|
max-width: none;
|
||||||
|
}
|
||||||
|
</style></code></pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -485,5 +485,5 @@ a.olControlZoomOut {
|
|||||||
|
|
||||||
/* override any max-width image settings (e.g. bootstrap.css) */
|
/* override any max-width image settings (e.g. bootstrap.css) */
|
||||||
img.olTileImage {
|
img.olTileImage {
|
||||||
max-width: none !important;
|
max-width: none;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user