loleaflet/src/map/Map.js |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit 9f0c6cb54b2fab5fedfb874da093774bcb646800
Author:     Tor Lillqvist <t...@collabora.com>
AuthorDate: Wed Mar 18 16:55:42 2020 +0200
Commit:     Tor Lillqvist <t...@collabora.com>
CommitDate: Wed Mar 18 17:30:07 2020 +0100

    Add dummy (for now) style sheet programmatically specifically for mobile 
phones
    
    Ideally, perhaps, we should avoid relying on CSS media queries to
    detect mobile phones. Here I just add a placeholder to remember where
    is a good (?) place to add such in JS instead.
    
    Sadly cannot use the more elegant template literal syntax for
    multi-line string literals, as some of the Jenkins builders don't seem
    to like it.
    
    Change-Id: I718f86f41cae461abbca3d7cd2751de3236bff18
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90705
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Tor Lillqvist <t...@collabora.com>

diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index 600a078d3..69f094070 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -231,6 +231,14 @@ L.Map = L.Evented.extend({
                                this._size = new L.Point(0,0);
                                this._onResize();
                                this._socket.sendMessage('uno 
.uno:LOKSetMobile');
+                               // Add a style sheet for mobile phones. Just a 
placeholder so far.
+                               var style = document.createElement('style');
+                               style.innerHTML = ' \
+#foobar { \
+        background: red; \
+} \
+';
+                               document.head.appendChild(style);
                        }
                });
                this.on('updatetoolbarcommandvalues', function(e) {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to