Rendering of Polymer web app on safari and firefox - html

I'm having a nightmare on rendering my webapp on safari. I have a iron-list in my custom element and the data that will be display are from iron-ajax request. Everything works well in chrome but when I test it on safari, it wasn't rendered properly. Here is what I notice under the hook,
for safari:
<iron-list id="abc" style="min-height: 50px; overflow: auto;" selection-enabled="" class="style-scope view-file x-scope iron-list-0">
<array-selector id="selector" class="style-scope iron-list">
</array-selector>
<div id="items" class="style-scope iron-list" style="height: 15008px;">
<template class="style-scope view-file"></template>
<div class="style-scope view-file" style="transform: translate3d(0px, 0px, 0px);">
<list-row class="item style-scope view-file x-scope list-row-0" tabindex="0">
<div id="row" class="row style-scope list-row">
<file-type-icon style="padding-left: 10px;" class="style-scope list-row">
<iron-icon class="foo style-scope file-type-icon dir x-scope iron-icon-2" id="foo">
<svg viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet" class="style-scope iron-icon" style="pointer-events: none; display: block; width: 100%; height: 100%;">
<g class="style-scope iron-icon">
<path d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z" class="style-scope iron-icon"></path>
</g>
</svg>
</iron-icon>
</file-type-icon>
<div class="cell name style-scope list-row">
<label id="filename" style="padding-left:5px;" class="style-scope list-row">disk</label>
</div>
<div class="cell ctime style-scope list-row">29 May 2016 at 21:32:38 GMT+2</div>
<div class="cell mtime style-scope list-row">
<template is="dom-if" restamp="" class="style-scope list-row"></template>
<template is="dom-if" restamp="" class="style-scope list-row"></template>
</div>
<div class="cell size style-scope list-row" id="hovering">
<span class="style-scope list-row">--</span>
</div>
</div>
</list-row>
</div>
<div class="style-scope view-file" style="transform: translate3d(0px, 1876px, 0px);">
<list-row class="item style-scope view-file x-scope list-row-0" tabindex="-1">
<div id="row" class="row style-scope list-row">
<file-type-icon style="padding-left: 10px;" class="style-scope list-row">
<iron-icon class="foo style-scope file-type-icon dir x-scope iron-icon-2" id="foo">
<svg viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet" class="style-scope iron-icon" style="pointer-events: none; display: block; width: 100%; height: 100%;">
<g class="style-scope iron-icon">
<path d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z" class="style-scope iron-icon"></path>
</g>
</svg>
</iron-icon>
</file-type-icon>
<div class="cell name style-scope list-row">
<label id="filename" style="padding-left:5px;" class="style-scope list-row">lost+found</label>
</div>
<div class="cell ctime style-scope list-row">29 May 2016 at 21:32:20 GMT+2</div>
<div class="cell mtime style-scope list-row">
<template is="dom-if" restamp="" class="style-scope list-row"></template>
<template is="dom-if" restamp="" class="style-scope list-row"></template>
</div>
<div class="cell size style-scope list-row" id="hovering">
<span class="style-scope list-row">--</span>
</div>
</div>
</list-row>
</div>
<div class="style-scope view-file" style="transform: translate3d(0px, 3752px, 0px);">
<list-row class="item style-scope view-file x-scope list-row-0" tabindex="-1">
<div id="row" class="row style-scope list-row">
<file-type-icon style="padding-left: 10px;" class="style-scope list-row">
<iron-icon class="foo style-scope file-type-icon dir x-scope iron-icon-2" id="foo">
<svg viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet" class="style-scope iron-icon" style="pointer-events: none; display: block; width: 100%; height: 100%;">
<g class="style-scope iron-icon">
<path d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z" class="style-scope iron-icon"></path>
</g>
</svg>
</iron-icon>
</file-type-icon>
<div class="cell name style-scope list-row">
<label id="filename" style="padding-left:5px;" class="style-scope list-row">private</label>
</div>
<div class="cell ctime style-scope list-row">29 May 2016 at 21:32:38 GMT+2</div>
<div class="cell mtime style-scope list-row">
<template is="dom-if" restamp="" class="style-scope list-row"></template>
<template is="dom-if" restamp="" class="style-scope list-row"></template>
</div>
<div class="cell size style-scope list-row" id="hovering">
<span class="style-scope list-row">--</span>
</div>
</div>
</list-row>
</div>
</div>
</iron-list>
for chrome:
<iron-list id="abc" style="min-height: 50px; overflow: auto;" selection-enabled="" class="style-scope view-file x-scope iron-list-0">
<array-selector id="selector" class="style-scope iron-list">
</array-selector>
<div id="items" class="style-scope iron-list" style="height: 328px;">
<template class="style-scope view-file"></template>
<div class="style-scope view-file" style="transform: translate3d(0px, 0px, 0px);">
<list-row class="item style-scope view-file x-scope list-row-0" tabindex="0">
<div id="row" class="row style-scope list-row">
<file-type-icon style="padding-left: 10px;" class="style-scope list-row">
<iron-icon class="foo style-scope file-type-icon dir x-scope iron-icon-2" id="foo">
<svg viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet" class="style-scope iron-icon" style="pointer-events: none; display: block; width: 100%; height: 100%;">
<g class="style-scope iron-icon">
<path d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z" class="style-scope iron-icon"></path>
</g>
</svg>
</iron-icon>
</file-type-icon>
<div class="cell name style-scope list-row">
<label id="filename" style="padding-left:5px;" class="style-scope list-row">disk</label>
</div>
<div class="cell ctime style-scope list-row">5/29/2016, 9:32:38 PM</div>
<div class="cell mtime style-scope list-row">
<template is="dom-if" restamp="" class="style-scope list-row"></template>
<template is="dom-if" restamp="" class="style-scope list-row"></template>
</div>
<div class="cell size style-scope list-row" id="hovering">
<span class="style-scope list-row">--</span>
</div>
</div>
</list-row>
</div>
<div class="style-scope view-file" style="transform: translate3d(0px, 41px, 0px);">
<list-row class="item style-scope view-file x-scope list-row-0" tabindex="-1">
<div id="row" class="row style-scope list-row">
<file-type-icon style="padding-left: 10px;" class="style-scope list-row">
<iron-icon class="foo style-scope file-type-icon dir x-scope iron-icon-2" id="foo">
<svg viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet" class="style-scope iron-icon" style="pointer-events: none; display: block; width: 100%; height: 100%;">
<g class="style-scope iron-icon">
<path d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z" class="style-scope iron-icon"></path>
</g>
</svg>
</iron-icon>
</file-type-icon>
<div class="cell name style-scope list-row">
<label id="filename" style="padding-left:5px;" class="style-scope list-row">lost+found</label>
</div>
<div class="cell ctime style-scope list-row">5/29/2016, 9:32:20 PM</div>
<div class="cell mtime style-scope list-row">
<template is="dom-if" restamp="" class="style-scope list-row"></template>
<template is="dom-if" restamp="" class="style-scope list-row"></template>
</div>
<div class="cell size style-scope list-row" id="hovering">
<span class="style-scope list-row">--</span>
</div>
</div>
</list-row>
</div>
<div class="style-scope view-file" style="transform: translate3d(0px, 82px, 0px);">
<list-row class="item style-scope view-file x-scope list-row-0" tabindex="-1">
<div id="row" class="row style-scope list-row">
<file-type-icon style="padding-left: 10px;" class="style-scope list-row">
<iron-icon class="foo style-scope file-type-icon dir x-scope iron-icon-2" id="foo">
<svg viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet" class="style-scope iron-icon" style="pointer-events: none; display: block; width: 100%; height: 100%;">
<g class="style-scope iron-icon">
<path d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z" class="style-scope iron-icon"></path>
</g>
</svg>
</iron-icon>
</file-type-icon>
<div class="cell name style-scope list-row">
<label id="filename" style="padding-left:5px;" class="style-scope list-row">private</label>
</div>
<div class="cell ctime style-scope list-row">5/29/2016, 9:32:38 PM</div>
<div class="cell mtime style-scope list-row">
<template is="dom-if" restamp="" class="style-scope list-row"></template>
<template is="dom-if" restamp="" class="style-scope list-row"></template>
</div>
<div class="cell size style-scope list-row" id="hovering">
<span class="style-scope list-row">--</span>
</div>
</div>
</list-row>
</div>
<div class="style-scope view-file" style="transform: translate3d(0px, 123px, 0px);">
<list-row class="item style-scope view-file x-scope list-row-0" tabindex="-1">
<div id="row" class="row style-scope list-row">
<file-type-icon style="padding-left: 10px;" class="style-scope list-row">
<iron-icon class="foo style-scope file-type-icon dir x-scope iron-icon-2" id="foo">
<svg viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet" class="style-scope iron-icon" style="pointer-events: none; display: block; width: 100%; height: 100%;">
<g class="style-scope iron-icon">
<path d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z" class="style-scope iron-icon"></path>
</g>
</svg>
</iron-icon>
</file-type-icon>
<div class="cell name style-scope list-row">
<label id="filename" style="padding-left:5px;" class="style-scope list-row">public</label>
</div>
<div class="cell ctime style-scope list-row">5/29/2016, 9:32:38 PM</div>
<div class="cell mtime style-scope list-row">
<template is="dom-if" restamp="" class="style-scope list-row"></template>
<template is="dom-if" restamp="" class="style-scope list-row"></template>
</div>
<div class="cell size style-scope list-row" id="hovering">
<span class="style-scope list-row">--</span>
</div>
</div>
</list-row>
</div>
<div class="style-scope view-file" style="transform: translate3d(0px, 164px, 0px);">
<list-row class="item style-scope view-file x-scope list-row-0" tabindex="-1">
<div id="row" class="row style-scope list-row">
<file-type-icon style="padding-left: 10px;" class="style-scope list-row">
<iron-icon class="foo style-scope file-type-icon dir x-scope iron-icon-2" id="foo">
<svg viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet" class="style-scope iron-icon" style="pointer-events: none; display: block; width: 100%; height: 100%;">
<g class="style-scope iron-icon">
<path d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z" class="style-scope iron-icon"></path>
</g>
</svg>
</iron-icon>
</file-type-icon>
<div class="cell name style-scope list-row">
<label id="filename" style="padding-left:5px;" class="style-scope list-row">replica</label>
</div>
<div class="cell ctime style-scope list-row">5/29/2016, 9:32:38 PM</div>
<div class="cell mtime style-scope list-row">
<template is="dom-if" restamp="" class="style-scope list-row"></template>
<template is="dom-if" restamp="" class="style-scope list-row"></template>
</div>
<div class="cell size style-scope list-row" id="hovering">
<span class="style-scope list-row">--</span>
</div>
</div>
</list-row>
</div>
<div class="style-scope view-file" style="transform: translate3d(0px, 205px, 0px);">
<list-row class="item style-scope view-file x-scope list-row-0" tabindex="-1">
<div id="row" class="row style-scope list-row">
<file-type-icon style="padding-left: 10px;" class="style-scope list-row">
<iron-icon class="foo style-scope file-type-icon dir x-scope iron-icon-2" id="foo">
<svg viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet" class="style-scope iron-icon" style="pointer-events: none; display: block; width: 100%; height: 100%;">
<g class="style-scope iron-icon">
<path d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z" class="style-scope iron-icon"></path>
</g>
</svg>
</iron-icon>
</file-type-icon>
<div class="cell name style-scope list-row">
<label id="filename" style="padding-left:5px;" class="style-scope list-row">reserved</label>
</div>
<div class="cell ctime style-scope list-row">5/29/2016, 9:32:38 PM</div>
<div class="cell mtime style-scope list-row">
<template is="dom-if" restamp="" class="style-scope list-row"></template>
<template is="dom-if" restamp="" class="style-scope list-row"></template>
</div>
<div class="cell size style-scope list-row" id="hovering">
<span class="style-scope list-row">--</span>
</div>
</div>
</list-row>
</div>
<div class="style-scope view-file" style="transform: translate3d(0px, 246px, 0px);">
<list-row class="item style-scope view-file x-scope list-row-0" tabindex="-1">
<div id="row" class="row style-scope list-row">
<file-type-icon style="padding-left: 10px;" class="style-scope list-row">
<iron-icon class="foo style-scope file-type-icon dir x-scope iron-icon-2" id="foo">
<svg viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet" class="style-scope iron-icon" style="pointer-events: none; display: block; width: 100%; height: 100%;">
<g class="style-scope iron-icon">
<path d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z" class="style-scope iron-icon"></path>
</g>
</svg>
</iron-icon>
</file-type-icon>
<div class="cell name style-scope list-row">
<label id="filename" style="padding-left:5px;" class="style-scope list-row">resilient</label>
</div>
<div class="cell ctime style-scope list-row">5/29/2016, 9:32:38 PM</div>
<div class="cell mtime style-scope list-row">
<template is="dom-if" restamp="" class="style-scope list-row"></template>
<template is="dom-if" restamp="" class="style-scope list-row"></template>
</div>
<div class="cell size style-scope list-row" id="hovering">
<span class="style-scope list-row">--</span>
</div>
</div>
</list-row>
</div>
<div class="style-scope view-file" style="transform: translate3d(0px, 287px, 0px);">
<list-row class="item style-scope view-file x-scope list-row-0" tabindex="-1">
<div id="row" class="row style-scope list-row">
<file-type-icon style="padding-left: 10px;" class="style-scope list-row">
<iron-icon class="foo style-scope file-type-icon dir x-scope iron-icon-2" id="foo">
<svg viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet" class="style-scope iron-icon" style="pointer-events: none; display: block; width: 100%; height: 100%;">
<g class="style-scope iron-icon">
<path d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z" class="style-scope iron-icon"></path>
</g>
</svg>
</iron-icon>
</file-type-icon>
<div class="cell name style-scope list-row">
<label id="filename" style="padding-left:5px;" class="style-scope list-row">tape</label>
</div>
<div class="cell ctime style-scope list-row">5/29/2016, 9:32:38 PM</div>
<div class="cell mtime style-scope list-row">
<template is="dom-if" restamp="" class="style-scope list-row"></template>
<template is="dom-if" restamp="" class="style-scope list-row"></template>
</div>
<div class="cell size style-scope list-row" id="hovering">
<span class="style-scope list-row">--</span>
</div>
</div>
</list-row>
</div>
</div>
</iron-list>
one major thing that stick out of both snippets is the difference in the height of the div, for chrome:
<div id="items" class="style-scope iron-list" style="height: 328px;">
and for safari:
<div id="items" class="style-scope iron-list" style="height: 15008px;">.
Here is the source code of the element:
<link rel="import" href="../../../../bower_components/polymer/polymer.html">
<link rel="import" href="../../../../bower_components/iron-ajax/iron-ajax.html">
<link rel="import" href="../../../../bower_components/iron-flex-layout/iron-flex-layout.html">
<link rel="import" href="../../../../bower_components/iron-list/iron-list.html">
<link rel="import" href="../../../../bower_components/iron-selector/iron-selector.html">
<link rel="import" href="../../../../bower_components/paper-card/paper-card.html">
<link rel="import" href="../../list-view/list-row.html">
<link rel="import" href="../../access-denied-or-empty-directory/access-denied-or-empty-directory.html">
<dom-module id="view-file">
<style>
:host {
#apply(--layout-fit);
#apply(--layout-vertical);
margin: 0px 30px;
/*Prevent text selection after double click*/
-webkit-user-select: none;
/* webkit (safari, chrome) browsers */
-moz-user-select: none;
/* mozilla browsers */
-khtml-user-select: none;
/* webkit (konqueror) browsers */
-ms-user-select: none;
/* IE10+ */
}
.fit {
#apply(--layout-fit);
}
.item {
text-decoration: none !important;
background-color: white;
#apply(--layout-flex);
cursor: pointer;
}
.item:hover {
background-color: #e9e9e9;
}
.item.selected {
background-color: #2196F3;
color: #fafafa;
outline: 0;
}
</style>
<template>
<iron-ajax id="ajax" auto url="{{url}}" method="GET" content-type="application/json" headers$='[[_computeHeaders(isSomebody)]]' handle-as="json" on-response="handleResponse" last-response="{{data}}">
</iron-ajax>
<paper-material id="content" elevation="1">
<template is="dom-if" if="{{hasFiles}}" restamp>
<iron-list id="abc" items="[[data.children]]" style="min-height:50px;" selected-item="{{selectedItem}}" selected-items="{{selectedItems}}" selection-enabled>
<template>
<div>
<list-row class$="[[_computedClass(selected)]]" tabindex$="[[tabIndex]]" name="{{item.fileName}}" file-type="{{item.fileType}}" ctime="{{item.creationTime}}" mtime="{{item.mtime}}" size="{{item.size}}" loc="{{item.fileLocality}}" parent-path="[[parent]]">
</list-row>
</div>
</template>
</iron-list>
</template>
<template is="dom-if" if="{{isEmptyDenied}}" restamp>
<access-denied-or-empty-directory message="{{msg}}"></access-denied-or-empty-directory>
</template>
</paper-material>
</template>
<script>
Polymer
({
is: "view-file",
properties: {
path: {
type: String,
value: "/",
notify: true
},
parent: {
type: String,
notify: true,
computed: '_computeParentPath(path)'
},
selectedItems: {
type: Object
},
selectedItem: {
type: Object
},
isSel: {
type: Boolean,
notify: true
},
hasFiles: {
type: Boolean,
notify: true
},
isEmptyDenied: {
type: Boolean,
notify: true
},
isSomebody: {
type: Boolean,
notify: true
},
url: {
type: Object,
notify: true,
value: function() {
return window.CONFIG.restHostName + ":" + window.CONFIG.restPort + window.CONFIG.restPath +
"namespace/?children=true&locality=true";
},
computed: '_url(path)'
},
msg: {
type: String,
notify: true
},
},
attached: function() {
this.isSomebody = app.$.WhoAmI.isSomebody;
},
_computedClass: function(isSelected) {
var classes = 'item';
if (isSelected) {
classes += ' selected';
}
this.updateStyles();
return classes;
},
_url: function(path) {
if (this.path == null || this.path == "" || this.path == "/") {
return window.CONFIG.restHostName + ":" + window.CONFIG.restPort +
window.CONFIG.restPath + "namespace/?children=true&locality=true";
} else {
path = decodeURIComponent(this.path);
path = path.replace(/=/g, "/");
return window.CONFIG.restHostName + ":" + window.CONFIG.restPort + window.CONFIG.restPath +
"namespace" + path + "/?children=true&locality=true";
}
},
_computeParentPath: function(path) {
if (this.path == null || this.path == "" || this.path == "/") {
path = "/";
return path;
} else {
path = decodeURIComponent(this.path);
path = path.replace(/=/g, "/");
return path + "/";
}
},
_computeHeaders: function(isSomebody) {
//For now use this for this development stage
// TODO: need to re-wire this function activities
if (isSomebody == true) {
if (sessionStorage.upauth == null || sessionStorage.upauth == "") {
return '{"Accept":"application/json"}';
} else {
auth = sessionStorage.upauth;
return '{"Accept":"application/json", "Authorization":"Basic ' + auth + '"}';
}
} else {
return '{"Accept":"application/json"}';
}
},
handleResponse: function(e, request) {
//FIXME: Not the suitable solution. Error not properly handle.
x = request.xhr.response.children;
if (x.length == 0 || (x.length == 1 && (x[0].messages != undefined || x[0].messages != null))) {
this.isEmptyDenied = true;
this.hasFiles = false;
if (x.length == 0) {
this.msg = "Empty Directory";
} else if (x[0].messages != undefined || x[0].messages != null) {
this.msg = (x[0].messages).toString();
}
} else {
this.isEmptyDenied = false;
this.hasFiles = true;
}
Polymer.dom.flush();
this.updateStyles();
e.stopPropagation();
},
});
</script>
</dom-module>
And the index.html looks like this:
<!DOCTYPE html>
<html>
<head>
<link rel="import" id="bundle" href="elements/elements.html">
</head>
<body class="fullbleed layout vertical">
. . .
<div class="fit">
<view-file id="homeDir"></view-file>
</div>
. . .
</body>
</html>
Please how can I fix this

You're probably missing this:
<script>
// Load Web Components when not supported
var webComponentsSupported = ("registerElement" in document
&& 'import' in document.createElement("link")
&& 'content' in document.createElement("template"));
if (!webComponentsSupported) {
var script = document.createElement("script");
script.src = "assets/bower_components/webcomponentsjs/webcomponents-lite.js";
document.head.appendChild(script);
console.log("WebComponents Loaded");
}
</script>
You should put this script on the index, right after loading polymer and the elements. This script will load WebComponents when it isn't supported by default.

Related

Hide icon before text on overflow

On my Website I have some tiles to show some content. Depending on screensize the number of tiles per line is changing. Each tile has a button with an icon and text inside.
My problem is that on some screensizes the button gets to small and therefore the text is displayed in a new line.
What I would like to do is to hide the icon in front of the text when the button gets to small to display both in one line. Is there any way to achieve that?
Example Code:
.container {
display: flex;
flex-wrap: wrap;
}
.tile {
width: 50%;
}
#media screen and (min-width: 350px) {
.tile {
width: 33.3333%;
}
}
#media screen and (min-width: 500px) {
.tile {
width: 25%;
}
}
.tile_content {
margin: 10px;
background: grey;
}
button {
width: 100%;
}
<div class="container">
<div class="tile">
<div class="tile_content">
<div>
some content...
</div>
<div>
<button>
<svg fill="#000000" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30" width="30px" height="30px">
<path d="M15,3C8.373,3,3,8.373,3,15c0,6.627,5.373,12,12,12s12-5.373,12-12C27,8.373,21.627,3,15,3z M16,21h-2v-7h2V21z M15,11.5 c-0.828,0-1.5-0.672-1.5-1.5s0.672-1.5,1.5-1.5s1.5,0.672,1.5,1.5S15.828,11.5,15,11.5z" /></svg>
<span>Informations</span>
</button>
</div>
</div>
</div>
<div class="tile">
<div class="tile_content">
<div>
some content...
</div>
<div>
<button>
<svg fill="#000000" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30" width="30px" height="30px">
<path d="M15,3C8.373,3,3,8.373,3,15c0,6.627,5.373,12,12,12s12-5.373,12-12C27,8.373,21.627,3,15,3z M16,21h-2v-7h2V21z M15,11.5 c-0.828,0-1.5-0.672-1.5-1.5s0.672-1.5,1.5-1.5s1.5,0.672,1.5,1.5S15.828,11.5,15,11.5z" /></svg>
<span>Informations</span>
</button>
</div>
</div>
</div>
<div class="tile">
<div class="tile_content">
<div>
some content...
</div>
<div>
<button>
<svg fill="#000000" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30" width="30px" height="30px">
<path d="M15,3C8.373,3,3,8.373,3,15c0,6.627,5.373,12,12,12s12-5.373,12-12C27,8.373,21.627,3,15,3z M16,21h-2v-7h2V21z M15,11.5 c-0.828,0-1.5-0.672-1.5-1.5s0.672-1.5,1.5-1.5s1.5,0.672,1.5,1.5S15.828,11.5,15,11.5z" /></svg>
<span>Informations</span>
</button>
</div>
</div>
</div>
<div class="tile">
<div class="tile_content">
<div>
some content...
</div>
<div>
<button>
<svg fill="#000000" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30" width="30px" height="30px">
<path d="M15,3C8.373,3,3,8.373,3,15c0,6.627,5.373,12,12,12s12-5.373,12-12C27,8.373,21.627,3,15,3z M16,21h-2v-7h2V21z M15,11.5 c-0.828,0-1.5-0.672-1.5-1.5s0.672-1.5,1.5-1.5s1.5,0.672,1.5,1.5S15.828,11.5,15,11.5z" /></svg>
<span>Informations</span>
</button>
</div>
</div>
</div>
</div>
https://jsfiddle.net/qafc1wd9/
I found this article explaining how to do it:
https://www.freecodecamp.org/news/the-fab-four-technique-to-create-responsive-emails-without-media-queries-baf11fdfa848/
.container {
display: flex;
flex-wrap: wrap;
}
.tile {
width: 50%;
}
#media screen and (min-width: 350px) {
.tile {
width: 33.3333%;
}
}
#media screen and (min-width: 500px) {
.tile {
width: 25%;
}
}
.tile_content {
margin: 10px;
background: grey;
}
button {
width: 100%;
display: flex;
justify-content: center;
align-items: center;
}
svg {
min-width: 0;
max-width: 30px;
width: calc((100% - 124px)*124);
}
<div class="container">
<div class="tile">
<div class="tile_content">
<div>
some content...
</div>
<div>
<button>
<svg fill="#000000" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30" width="30px" height="30px">
<path d="M15,3C8.373,3,3,8.373,3,15c0,6.627,5.373,12,12,12s12-5.373,12-12C27,8.373,21.627,3,15,3z M16,21h-2v-7h2V21z M15,11.5 c-0.828,0-1.5-0.672-1.5-1.5s0.672-1.5,1.5-1.5s1.5,0.672,1.5,1.5S15.828,11.5,15,11.5z" /></svg>
<span>Informations</span>
</button>
</div>
</div>
</div>
<div class="tile">
<div class="tile_content">
<div>
some content...
</div>
<div>
<button>
<svg fill="#000000" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30" width="30px" height="30px">
<path d="M15,3C8.373,3,3,8.373,3,15c0,6.627,5.373,12,12,12s12-5.373,12-12C27,8.373,21.627,3,15,3z M16,21h-2v-7h2V21z M15,11.5 c-0.828,0-1.5-0.672-1.5-1.5s0.672-1.5,1.5-1.5s1.5,0.672,1.5,1.5S15.828,11.5,15,11.5z" /></svg>
<span>Informations</span>
</button>
</div>
</div>
</div>
<div class="tile">
<div class="tile_content">
<div>
some content...
</div>
<div>
<button>
<svg fill="#000000" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30" width="30px" height="30px">
<path d="M15,3C8.373,3,3,8.373,3,15c0,6.627,5.373,12,12,12s12-5.373,12-12C27,8.373,21.627,3,15,3z M16,21h-2v-7h2V21z M15,11.5 c-0.828,0-1.5-0.672-1.5-1.5s0.672-1.5,1.5-1.5s1.5,0.672,1.5,1.5S15.828,11.5,15,11.5z" /></svg>
<span>Informations</span>
</button>
</div>
</div>
</div>
<div class="tile">
<div class="tile_content">
<div>
some content...
</div>
<div>
<button>
<svg fill="#000000" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30" width="30px" height="30px">
<path d="M15,3C8.373,3,3,8.373,3,15c0,6.627,5.373,12,12,12s12-5.373,12-12C27,8.373,21.627,3,15,3z M16,21h-2v-7h2V21z M15,11.5 c-0.828,0-1.5-0.672-1.5-1.5s0.672-1.5,1.5-1.5s1.5,0.672,1.5,1.5S15.828,11.5,15,11.5z" /></svg>
<span>Informations</span>
</button>
</div>
</div>
</div>
</div>
https://jsfiddle.net/0uehno5L/

How do i get my sticky navbar to work using tailwind css?

I am working on a website using tailwindcss. But for some reason the navbar wont work when using the "sticky" class. I tried using the "fixed" class instead, but that did not work with the banner. I have also tried to use:
nav {
position: -webkit-sticky;
position: sticky;
}
but it has been usuccessful. I have also used some other css and javascript to style the searchbar how i want it.
How can i get the navbar to always stick?
Here is the code for the nav and the banner:
<div>
<div>
<nav class="sticky w-full md:flex md:justify-between md:items-center md:flex-wrap px-10 md:px-48 bg-gray-200 py-2"> <!--Navigation-->
<div class="flex md:flex justify-between md:items-center"> <!--Title och Burger button-->
<h1 class="text-xl text-emerald-600">
Logo
</h1>
<div class="px-4 mt-1 justify-end cursor-pointer md:hidden" id="burger">
<svg class="w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round" d="M4 6h16M4 12h16M4 18h16" />
</svg>
</div>
</div>
<ul class="md:flex md:flex-1 hidden md:justify-around" id="menu">
<li class="text-">
Home
</li>
<li class="">
About
</li>
<li class="">
Products
</li>
</ul>
<div class="input-container"> <!--Searchbar-->
<input id="in" type="search" placeholder="Search for product" class="border-gray-black rounded-md p-0 input-search-field pl-3">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 hero" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
</svg>
<button class="md:pr-5">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
</svg>
</button>
</div>
<div class=""> <!--Login/Signup-->
Log in
Sign up
</div>
</nav>
</div>
<div class="relative w-full container"> <!--Banner-->
<img src="img/Banner.png" alt="">
<button class="btn px-4 py-3 bg-blue-600 rounded-md hover:bg-blue-700 transition ease-in-out">Check our products</button>
</div>
<main class="">
</main>
</div>
The css code i used for the searchbar:
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
nav {
position: -webkit-sticky;
position: sticky;
}
.input-search-field::-webkit-search-cancel-button {
-webkit-appearance: none;
border-radius: 20px;
}
.input-search-field[type="search"] {
position: relative;
}
.input-container {
display: flex;
align-items: center;
position: relative;
}
.hero {
width: 15px;
position: absolute;
left: 150px;
cursor: pointer;
}
.container .btn {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
}
Javascript:
var result = document.querySelector('.hero').addEventListener('click', myfunction)
function myfunction() {
var input = document.querySelector('#in').value="";
}
console.log(result);
const burger = document.querySelector('#burger');
const menu = document.querySelector('#menu');
burger.addEventListener('click', () => {
if (menu.classList.contains('hidden')) {
menu.classList.remove('hidden');
} else {
menu.classList.add('hidden');
}
})
You have to give position sticky to div not in nav and also use top:0px;
HTML Code
<div class="sti">
<nav class="sticky w-full md:flex md:justify-between md:items-center md:flex-wrap px-10 md:px-48 bg-gray-200 py-2"> <!--Navigation-->
<div class="flex md:flex justify-between md:items-center"> <!--Title och Burger button-->
<h1 class="text-xl text-emerald-600">
Logo
</h1>
<div class="px-4 mt-1 justify-end cursor-pointer md:hidden" id="burger">
<svg class="w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round" d="M4 6h16M4 12h16M4 18h16" />
</svg>
</div>
</div>
<ul class="md:flex md:flex-1 hidden md:justify-around" id="menu">
<li class="text-">
Home
</li>
<li class="">
About
</li>
<li class="">
Products
</li>
</ul>
<div class="input-container"> <!--Searchbar-->
<input id="in" type="search" placeholder="Search for product" class="border-gray-black rounded-md p-0 input-search-field pl-3">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 hero" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
</svg>
<button class="md:pr-5">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
</svg>
</button>
</div>
<div class=""> <!--Login/Signup-->
Log in
Sign up
</div>
</nav>
</div>
CSS Code
.sti {
position: -webkit-sticky;
position: sticky;
top: 0px;
}

Overlay a Bootstrap Row completely

In many web environments with some degree of interaction among Users, if the platform allows, one can block another and effectively not even see the blocked person' posts.
Thinking about it, I decided to implement such a feature in a commenting system I made. Here's a fragment of it.
Through a class .blocked added to the wrapper of two Bootstrap 5 .row, I managed to style the pseudo-selector ::before to cover the whole content as desired, but in order to add some text in a non-hard-coded way, I ended up having to use a data-attribute.
It works, yes, but even though the visual background extends to the whole width, this added content does not, it gets limited by the width of these two rows within.
Also, it's not very much flexible as it limits my customization options, especially through Javascript, since I don't have other tags within to manipulate.
So, how could I accomplish my goal in a flexible way?
html,
body {
height: 100%;
width: 75%;
margin-top: 5%;
}
.wrapper {
min-height: 100vh;
height: 100vh;
}
main {
flex: 1;
}
/** This is not really hard-coded like, but... */
#comment_851030477 {
border: 1px solid black;
padding: 1rem;
}
.blocked {
background-color: #000;
display: flex;
bottom: 0;
left: 0;
position: relative;
top: 0;
}
.blocked>* {
visibility: hidden;
}
.blocked::before {
align-self: center;
color: #FFF;
content: attr(data-blocked);
display: flex;
margin: -1rem;
visibility: visible;
width: 100%;
}
.picture {
border: 1px solid blue;
}
/** Icons */
.icon {
-ms-flex-item-align: center;
align-self: center;
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
}
.icon.edit,
.icon.delete {
fill: rgba( var(--darker-gray));
height: 1.25rem;
width: 1.25rem;
}
.icon.block,
.icon.unblock {
fill: rgba( var(--darker-gray));
height: 1.25rem;
width: 1.25rem;
}
.icon.follow,
.icon.unfollow {
fill: rgba( var(--darker-gray));
height: 1.25rem;
width: 1.25rem;
}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap#5.1.3/dist/css/bootstrap.min.css" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<main class="container-fluid">
<div class="row w-100 px-3">
<div class="col">
<section>
<div class="container blocked" id="comment_851030477" data-blocked="THIS USER IS BLOCKED">
<div class="row gx-3">
<div class="d-flex col-5 col-sm-3 col-md-2 col-lg-2 col-xl-2 col-xxl-1 align-items-center picture"></div>
<div class="col align-self-center">
<div class="row">
<div class="col">
<div class="row flex-column author">
<div class="col display">Username</div>
<div class="col username">
<small class="text-muted">(#username)</small>
</div>
<div class="col date">
<small>Sunday, 30th May 2021</small>
</div>
</div>
</div>
<div class="col-2 d-flex flex-row justify-content-end tools">
<a href="javascript:void(0)" class="d-none block">
<svg viewBox="0 0 32 28" class="icon block mx-2">
<title>Block</title>
<use xlink:href="#block"></use>
</svg>
</a>
<a href="javascript:void(0)" class="unblock">
<svg viewBox="0 0 32 28" class="icon unblock mx-2">
<title>Unblock</title>
<use xlink:href="#unblock"></use>
</svg>
</a>
<a href="javascript:void(0)" class="follow d-none">
<svg viewBox="0 0 24 28" class="icon follow mx-2">
<title>Follow</title>
<use xlink:href="#follow"></use>
</svg>
</a>
<a href="javascript:void(0)" class="d-none unfollow">
<svg viewBox="0 0 24 28" class="icon unfollow mx-2">
<title>Unfollow</title>
<use xlink:href="#unfollow"></use>
</svg>
</a>
<a href="javascript:void(0)" class="d-none edit">
<svg viewBox="0 0 24 24" class="icon edit mx-2">
<title>Edit</title>
<use xlink:href="#edit"></use>
</svg>
</a>
<a href="javascript:void(0)" class="d-none delete">
<svg viewBox="0 0 24 24" class="icon delete mx-2">
<title>Delete</title>
<use xlink:href="#delete"></use>
</svg>
</a>
</div>
</div>
</div>
</div>
<div class="row message">
<div class="col">
<p>Lorem ipsum dolor sit amet...</p>
</div>
</div>
<div class="d-none blocked2">BLOCKED</div>
</div>
<div class="container mt-3" id="comment_851030477">
<div class="row gx-3">
<div class="d-flex col-5 col-sm-3 col-md-2 col-lg-2 col-xl-2 col-xxl-1 align-items-center picture foil"></div>
<div class="col align-self-center">
<div class="row">
<div class="col">
<div class="row flex-column author">
<div class="col display">Username</div>
<div class="col username">
<small class="text-muted">(#username)</small>
</div>
<div class="col date">
<small>Sunday, 30th May 2021</small>
</div>
</div>
</div>
<div class="col-2 d-flex flex-row justify-content-end tools">
<a href="javascript:void(0)" class="block">
<svg viewBox="0 0 32 28" class="icon block mx-2">
<title>Block</title>
<use xlink:href="#block"></use>
</svg>
</a>
<a href="javascript:void(0)" class="d-none unblock">
<svg viewBox="0 0 32 28" class="icon unblock mx-2">
<title>Unblock</title>
<use xlink:href="#unblock"></use>
</svg>
</a>
<a href="javascript:void(0)" class="follow d-none">
<svg viewBox="0 0 24 28" class="icon follow mx-2">
<title>Follow</title>
<use xlink:href="#follow"></use>
</svg>
</a>
<a href="javascript:void(0)" class="d-none unfollow">
<svg viewBox="0 0 24 28" class="icon unfollow mx-2">
<title>Unfollow</title>
<use xlink:href="#unfollow"></use>
</svg>
</a>
<a href="javascript:void(0)" class="d-none edit">
<svg viewBox="0 0 24 24" class="icon edit mx-2">
<title>Edit</title>
<use xlink:href="#edit"></use>
</svg>
</a>
<a href="javascript:void(0)" class="d-none delete">
<svg viewBox="0 0 24 24" class="icon delete mx-2">
<title>Delete</title>
<use xlink:href="#delete"></use>
</svg>
</a>
</div>
</div>
</div>
</div>
<div class="row message">
<div class="col">
<p>Lorem ipsum dolor sit amet...</p>
</div>
</div>
<div class="d-none blocked2">BLOCKED</div>
</div>
</section>
</div>
</div>
</main>
After cooling down a bit, I decided to have all of the necessary markup ready with control-classes to be manipulated with Javascript.
This is the final result, despite the positioning awkwardness and the fact SVG icons remain visible here.
$( '#comments' ).on( 'click', '.blocked a.reveal', function() {
$( this ).closest( '.container' )
.removeClass( 'blocked' )
.find( '.blocked-overlay' )
.addClass( 'd-none' );
})
html, body {
height: 100%;
width: 75%;
margin-top: 5%;
}
.wrapper {
min-height: 100vh;
height: 100vh;
}
main {
flex: 1;
}
/** This is not really hard-coded like this, but... */
#comment_851030477 {
border: 1px solid black;
padding: 1rem;
position: relative;
}
.blocked .blocked-overlay {
background-color: #FFF;
display: flex;
flex-direction: column;
height: 100%;
justify-content: center;
left: 0;
position: absolute;
top: 0;
width: 100%;
z-index: 1;
}
.blocked .blocked-overlay .reveal {
margin-left: .3rem;
}
.picture {
border: 1px solid blue;
}
/** Icons */
.icon {
-ms-flex-item-align: center;
align-self: center;
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
}
.icon.edit, .icon.delete {
fill: rgba( var(--darker-gray) );
height: 1.25rem;
width: 1.25rem;
}
.icon.block, .icon.unblock {
fill: rgba( var(--darker-gray) );
height: 1.25rem;
width: 1.25rem;
}
.icon.follow, .icon.unfollow {
fill: rgba( var(--darker-gray) );
height: 1.25rem;
width: 1.25rem;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.0.2/css/bootstrap.min.css" rel="stylesheet"/>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body class="d-flex flex-column" data-loaded="true">
<main class="container-fluid">
<div class="row w-100 px-3">
<div class="col">
<section id="comments">
<div class="container blocked" id="comment_851030477">
<div class="blocked-overlay">
<p class="d-inline-flex justify-content-center">
You have blocked the author of this comment
</p>
<p class="d-inline-flex justify-content-center">
If you still want to see it,
<a href="javascript:void(0)" class="reveal">
<span>click here</span>
</a>
</p>
</div>
<div class="row gx-3">
<div class="d-flex col-5 col-sm-3 col-md-2 col-lg-2 col-xl-2 col-xxl-1 align-items-center picture"></div>
<div class="col align-self-center">
<div class="row">
<div class="col">
<div class="row flex-column author">
<div class="col display">Username</div>
<div class="col username">
<small class="text-muted">(#username)</small>
</div>
<div class="col date">
<small>Sunday, 30th May 2021</small>
</div>
</div>
</div>
<div class="col-2 d-flex flex-row justify-content-end tools">
<a href="javascript:void(0)" class="d-none block">
<svg viewBox="0 0 32 28" class="icon block mx-2">
<title>Block</title>
<use xlink:href="#block"></use>
</svg>
</a>
<a href="javascript:void(0)" class="unblock">
<svg viewBox="0 0 32 28" class="icon unblock mx-2">
<title>Unblock</title>
<use xlink:href="#unblock"></use>
</svg>
</a>
<a href="javascript:void(0)" class="follow d-none">
<svg viewBox="0 0 24 28" class="icon follow mx-2">
<title>Follow</title>
<use xlink:href="#follow"></use>
</svg>
</a>
<a href="javascript:void(0)" class="d-none unfollow">
<svg viewBox="0 0 24 28" class="icon unfollow mx-2">
<title>Unfollow</title>
<use xlink:href="#unfollow"></use>
</svg>
</a>
<a href="javascript:void(0)" class="d-none edit">
<svg viewBox="0 0 24 24" class="icon edit mx-2">
<title>Edit</title>
<use xlink:href="#edit"></use>
</svg>
</a>
<a href="javascript:void(0)" class="d-none delete">
<svg viewBox="0 0 24 24" class="icon delete mx-2">
<title>Delete</title>
<use xlink:href="#delete"></use>
</svg>
</a>
</div>
</div>
</div>
</div>
<div class="row message">
<div class="col">
<p>Lorem ipsum dolor sit amet...</p>
</div>
</div>
<div class="d-none blocked2">BLOCKED</div>
</div>
<div class="container mt-3" id="comment_851030477">
<div class="row gx-3">
<div class="d-flex col-5 col-sm-3 col-md-2 col-lg-2 col-xl-2 col-xxl-1 align-items-center picture foil"></div>
<div class="col align-self-center">
<div class="row">
<div class="col">
<div class="row flex-column author">
<div class="col display">Username</div>
<div class="col username">
<small class="text-muted">(#username)</small>
</div>
<div class="col date">
<small>Sunday, 30th May 2021</small>
</div>
</div>
</div>
<div class="col-2 d-flex flex-row justify-content-end tools">
<a href="javascript:void(0)" class="block">
<svg viewBox="0 0 32 28" class="icon block mx-2">
<title>Block</title>
<use xlink:href="#block"></use>
</svg>
</a>
<a href="javascript:void(0)" class="d-none unblock">
<svg viewBox="0 0 32 28" class="icon unblock mx-2">
<title>Unblock</title>
<use xlink:href="#unblock"></use>
</svg>
</a>
<a href="javascript:void(0)" class="follow d-none">
<svg viewBox="0 0 24 28" class="icon follow mx-2">
<title>Follow</title>
<use xlink:href="#follow"></use>
</svg>
</a>
<a href="javascript:void(0)" class="d-none unfollow">
<svg viewBox="0 0 24 28" class="icon unfollow mx-2">
<title>Unfollow</title>
<use xlink:href="#unfollow"></use>
</svg>
</a>
<a href="javascript:void(0)" class="d-none edit">
<svg viewBox="0 0 24 24" class="icon edit mx-2">
<title>Edit</title>
<use xlink:href="#edit"></use>
</svg>
</a>
<a href="javascript:void(0)" class="d-none delete">
<svg viewBox="0 0 24 24" class="icon delete mx-2">
<title>Delete</title>
<use xlink:href="#delete"></use>
</svg>
</a>
</div>
</div>
</div>
</div>
<div class="row message">
<div class="col">
<p>Lorem ipsum dolor sit amet...</p>
</div>
</div>
<div class="d-none blocked2">BLOCKED</div>
</div>
</section>
</div>
</div>
</main>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<symbol id="edit-symbol" viewBox="0 0 24 24">
<path d="M20.719 7.031l-1.828 1.828-3.75-3.75 1.828-1.828q0.281-0.281 0.703-0.281t0.703 0.281l2.344 2.344q0.281 0.281 0.281 0.703t-0.281 0.703zM3 17.25l11.063-11.063 3.75 3.75-11.063 11.063h-3.75v-3.75z" />
</symbol>
<symbol id="delete-symbol" viewBox="0 0 24 24">
<path d="M18.984 3.984v2.016h-13.969v-2.016h3.469l1.031-0.984h4.969l1.031 0.984h3.469zM6 18.984v-12h12v12q0 0.797-0.609 1.406t-1.406 0.609h-7.969q-0.797 0-1.406-0.609t-0.609-1.406z" />
</symbol>
<symbol id="block-symbol" viewBox="0 0 24 28">
<path d="M20.5 13.953c0-1.703-0.5-3.281-1.359-4.609l-11.781 11.766c1.344 0.875 2.938 1.391 4.641 1.391 4.688 0 8.5-3.828 8.5-8.547zM4.891 18.625l11.797-11.781c-1.344-0.906-2.953-1.422-4.688-1.422-4.688 0-8.5 3.828-8.5 8.531 0 1.734 0.516 3.328 1.391 4.672zM24 13.953c0 6.656-5.375 12.047-12 12.047s-12-5.391-12-12.047c0-6.641 5.375-12.031 12-12.031s12 5.391 12 12.031z"/>
</symbol>
<symbol id="unblock-symbol" viewBox="0 0 24 24">
<path d="M11.859 9h0.141q1.219 0 2.109 0.891t0.891 2.109v0.188zM7.547 9.797q-0.563 1.125-0.563 2.203 0 2.063 1.477 3.539t3.539 1.477q1.078 0 2.203-0.563l-1.547-1.547q-0.375 0.094-0.656 0.094-1.219 0-2.109-0.891t-0.891-2.109q0-0.281 0.094-0.656zM2.016 4.266l1.266-1.266 17.719 17.719-1.266 1.266q-0.234-0.234-1.477-1.453t-1.898-1.875q-2.016 0.844-4.359 0.844-3.703 0-6.703-2.063t-4.313-5.438q0.516-1.219 1.617-2.695t2.133-2.273q-0.563-0.563-1.57-1.594t-1.148-1.172zM12 6.984q-0.938 0-1.828 0.375l-2.156-2.156q1.828-0.703 3.984-0.703 3.703 0 6.68 2.063t4.289 5.438q-1.125 2.766-3.422 4.734l-2.906-2.906q0.375-0.891 0.375-1.828 0-2.063-1.477-3.539t-3.539-1.477z"></path>
</symbol>
<symbol id="follow-symbol" viewBox="0 0 32 28">
<path d="M11 14c-3.313 0-6-2.688-6-6s2.688-6 6-6 6 2.688 6 6-2.688 6-6 6zM26 16h5.5c0.266 0 0.5 0.234 0.5 0.5v3c0 0.266-0.234 0.5-0.5 0.5h-5.5v5.5c0 0.266-0.234 0.5-0.5 0.5h-3c-0.266 0-0.5-0.234-0.5-0.5v-5.5h-5.5c-0.266 0-0.5-0.234-0.5-0.5v-3c0-0.266 0.234-0.5 0.5-0.5h5.5v-5.5c0-0.266 0.234-0.5 0.5-0.5h3c0.266 0 0.5 0.234 0.5 0.5v5.5zM14.5 19.5c0 1.094 0.906 2 2 2h4v3.719c-0.766 0.562-1.734 0.781-2.672 0.781h-13.656c-2.5 0-4.172-1.5-4.172-4.047 0-3.531 0.828-8.953 5.406-8.953 0.25 0 0.422 0.109 0.609 0.266 1.531 1.172 3.016 1.906 4.984 1.906s3.453-0.734 4.984-1.906c0.187-0.156 0.359-0.266 0.609-0.266 1.328 0 2.5 0.5 3.391 1.5h-3.484c-1.094 0-2 0.906-2 2v3z"/>
</symbol>
<symbol id="unfollow-symbol" viewBox="0 0 32 28">
<path d="M11 14c-3.313 0-6-2.688-6-6s2.688-6 6-6 6 2.688 6 6-2.688 6-6 6zM27.828 19l3.891 3.891c0.094 0.094 0.141 0.219 0.141 0.359 0 0.125-0.047 0.25-0.141 0.344l-2.125 2.125c-0.094 0.094-0.219 0.141-0.344 0.141-0.141 0-0.266-0.047-0.359-0.141l-3.891-3.891-3.891 3.891c-0.094 0.094-0.219 0.141-0.359 0.141-0.125 0-0.25-0.047-0.344-0.141l-2.125-2.125c-0.094-0.094-0.141-0.219-0.141-0.344 0-0.141 0.047-0.266 0.141-0.359l3.891-3.891-3.891-3.891c-0.094-0.094-0.141-0.219-0.141-0.359 0-0.125 0.047-0.25 0.141-0.344l2.125-2.125c0.094-0.094 0.219-0.141 0.344-0.141 0.141 0 0.266 0.047 0.359 0.141l3.891 3.891 3.891-3.891c0.094-0.094 0.219-0.141 0.359-0.141 0.125 0 0.25 0.047 0.344 0.141l2.125 2.125c0.094 0.094 0.141 0.219 0.141 0.344 0 0.141-0.047 0.266-0.141 0.359zM20.047 19l-2.828 2.828c-0.375 0.375-0.578 0.891-0.578 1.422 0 0.516 0.203 1.031 0.578 1.406l1.297 1.297c-0.219 0.031-0.453 0.047-0.688 0.047h-13.656c-2.5 0-4.172-1.5-4.172-4.047 0-3.531 0.828-8.953 5.406-8.953 0.25 0 0.422 0.109 0.609 0.266 1.5 1.188 3.031 1.906 4.984 1.906s3.484-0.719 4.984-1.906c0.187-0.156 0.359-0.266 0.609-0.266 0.297 0 0.594 0.031 0.891 0.094-0.516 0.5-0.844 0.906-0.844 1.656 0 0.531 0.203 1.047 0.578 1.422z"/>
</symbol>
</defs>
<g id="edit">
<use xlink:href="#edit-symbol"/>
</g>
<g id="delete">
<use xlink:href="#delete-symbol"/>
</g>
<g id="block">
<use xlink:href="#block-symbol"/>
</g>
<g id="unblock">
<use xlink:href="#unblock-symbol"/>
</g>
<g id="follow">
<use xlink:href="#follow-symbol"/>
</g>
<g id="unfollow">
<use xlink:href="#unfollow-symbol"/>
</g>
</svg>
</body>
</html>
During the loop where I render each entry, if I receive the Response indicating a User is blocked I add the class .blocked to the parent container and flip the displayability of the inner .blocked-overlay by removing Bootstrap's d-none
Then, separately, I attach a simple Event Handler to temporarily reveal the hidden content.

Is there a better alternative to Xpath to find elements for ReactJS apps?

I'm really struggling trying to locate a specific element inside the HTML at the end of my question. I'm writing test scripts with Python and Selenium.
The element I'm looking for, is the following:
<button class="jss906 jss1028" tabindex="0" type="button" aria-label="More" aria-haspopup="true" aria-owns="card-options-menu"><span class="jss1033"><svg class="jss169 jss170" focusable="false" viewBox="0 0 24 24" aria-hidden="true" role="presentation"><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"></path></svg></span><span class="jss909"></span></button>
Related to the "Tester Fester" <li>. I've tried numerous methods (find_element_by_xpath has been my only really useful method as there are few if any distinguishable element id's or classes to search for). The app is written with MaterialUI and it's been a bit of a struggle locating elements all along (as noted) and I was wondering if anyone could hint at a strategy to find them (buttons mainly).
If I attempt a simple:
driver.find_element_by_xpath('//*[#id="root"]/div/div[1]/div/main/div/div/div[2]/div[2]/div/div/div/div/ul/li[3]/ul/li[12]/div[2]/button')
(XPATH copied directly from Chrome DevTools using right-click Inspect)
I get a NoSuchElementException because the page is not completely done loading.
If I instead write in a driver.implicitly_wait(x) for varying times, the script eventually just gets a TimeoutException and quits without finding the element at all...
Using ExpectedConditions like so:
wait.until(EC.element_to_be_clickable((By.XPATH,'//*[#id="root"]/div/div[1]/div/main/div/div/div[2]/div[2]/div/div/div/div/ul/li[3]/ul/li[12]/div[2]/button')))
The same TimeoutException occurs.
<li class="jss2662">
<ul class="jss2663">
<li class="jss2840 jss2845 jss2843">Active Team Members (12)</li>
<li class="jss1724">
<div class="jss1723 jss1726 jss1731 jss1733">
<div theme="[object Object]" class="jss2740" style="position: relative; border: none; box-shadow: none; display: flex; justify-content: center; align-items: center; background: none;">
<div class="jss1039" title=""><span class="jss1049"><span class="jss1050 jss1037 jss1054"></span></span>
</div>
<div class="jss1056 jss2740" theme="[object Object]"><img alt="AA" src="https://res.cloudinary.com/gather-app/image/upload/a_0,c_crop,h_447,r_0,w_447,x_131,y_0/c_limit,f_auto,q_auto,w_80/v1/qa/user_provided/entity/553/1609276302437-DNR8F6Q-Ox" class="jss1058"></div>
</div>
<div class="jss1745 jss2739"><span class="jss133 jss142 jss1748">Aaron Aaronson</span>
<p class="jss133 jss141 jss166 jss1749">Invited by Aaron Aaronson</p>
</div>
</div>
<div class="jss2846"><button class="jss906 jss1028" tabindex="0" type="button" aria-label="More" aria-haspopup="true" aria-owns="card-options-menu"><span class="jss1033"><svg class="jss169 jss170" focusable="false" viewBox="0 0 24 24" aria-hidden="true" role="presentation"><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"></path></svg></span><span class="jss909"></span></button></div>
</li>
<li class="jss1724">
<div class="jss1723 jss1726 jss1731 jss1733">
<div theme="[object Object]" class="jss2740" style="position: relative; border: none; box-shadow: none; display: flex; justify-content: center; align-items: center; background: none;">
<div class="jss1039" title=""><span class="jss1049"><span class="jss1050 jss1037 jss1054"></span></span>
</div>
<div class="jss1056 jss1057 jss2740" theme="[object Object]">CR</div>
</div>
<div class="jss1745 jss2739"><span class="jss133 jss142 jss1748">Cole Ross</span>
<p class="jss133 jss141 jss166 jss1749">Invited by Aaron Aaronson</p>
</div>
</div>
<div class="jss2846"><button class="jss906 jss1028" tabindex="0" type="button" aria-label="More" aria-haspopup="true" aria-owns="card-options-menu"><span class="jss1033"><svg class="jss169 jss170" focusable="false" viewBox="0 0 24 24" aria-hidden="true" role="presentation"><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"></path></svg></span><span class="jss909"></span></button></div>
</li>
<li class="jss1724">
<div class="jss1723 jss1726 jss1731 jss1733">
<div theme="[object Object]" class="jss2740" style="position: relative; border: none; box-shadow: none; display: flex; justify-content: center; align-items: center; background: none;">
<div class="jss1039" title=""><span class="jss1049"><span class="jss1050 jss1037 jss1054"></span></span>
</div>
<div class="jss1056 jss2740" theme="[object Object]"><img alt="GU" src="https://res.cloudinary.com/gather-app/image/upload/a_0,c_crop,h_690,r_0,w_690,x_105,y_0/c_limit,f_auto,q_auto,w_80/v1/qa/user_provided/user_profile/683/1601932158737-tENd4dRwex" class="jss1058"></div>
</div>
<div class="jss1745 jss2739"><span class="jss133 jss142 jss1748">Gath Us</span>
<p class="jss133 jss141 jss166 jss1749">Invited by Aaron Aaronson</p>
</div>
</div>
<div class="jss2846"><button class="jss906 jss1028" tabindex="0" type="button" aria-label="More" aria-haspopup="true" aria-owns="card-options-menu"><span class="jss1033"><svg class="jss169 jss170" focusable="false" viewBox="0 0 24 24" aria-hidden="true" role="presentation"><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"></path></svg></span><span class="jss909"></span></button></div>
</li>
<li class="jss1724">
<div class="jss1723 jss1726 jss1731 jss1733">
<div theme="[object Object]" class="jss2740" style="position: relative; border: none; box-shadow: none; display: flex; justify-content: center; align-items: center; background: none;">
<div class="jss1039" title=""><span class="jss1049"><span class="jss1050 jss1037 jss1054"></span></span>
</div>
<div class="jss1056 jss2740" theme="[object Object]"><img alt="GB" src="https://res.cloudinary.com/gather-app/image/upload/c_limit,f_auto,q_auto,w_80/v1/qa/user_provided/user_profile/7/gertrude" class="jss1058"></div>
</div>
<div class="jss1745 jss2739"><span class="jss133 jss142 jss1748">Gertrude Bjørnvig</span>
<p class="jss133 jss141 jss166 jss1749">Invited by Aaron Aaronson</p>
</div>
</div>
<div class="jss2846"><button class="jss906 jss1028" tabindex="0" type="button" aria-label="More" aria-haspopup="true" aria-owns="card-options-menu"><span class="jss1033"><svg class="jss169 jss170" focusable="false" viewBox="0 0 24 24" aria-hidden="true" role="presentation"><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"></path></svg></span><span class="jss909"></span></button></div>
</li>
<li class="jss1724">
<div class="jss1723 jss1726 jss1731 jss1733">
<div theme="[object Object]" class="jss2740" style="position: relative; border: none; box-shadow: none; display: flex; justify-content: center; align-items: center; background: none;">
<div class="jss1039" title=""><span class="jss1049"><span class="jss1050 jss1037 jss1054"></span></span>
</div>
<div class="jss1056 jss2740" theme="[object Object]"><img alt="gs" src="https://res.cloudinary.com/gather-app/image/upload/a_0,c_crop,h_90,r_0,w_90,x_193,y_329/c_limit,f_auto,q_auto,w_80/v1/qa/user_provided/user_profile/1215/1605874019679-2XlY6V0RKx" class="jss1058"></div>
</div>
<div class="jss1745 jss2739"><span class="jss133 jss142 jss1748">gom supa</span>
<p class="jss133 jss141 jss166 jss1749">Invited by Aaron Aaronson</p>
</div>
</div>
<div class="jss2846"><button class="jss906 jss1028" tabindex="0" type="button" aria-label="More" aria-haspopup="true" aria-owns="card-options-menu"><span class="jss1033"><svg class="jss169 jss170" focusable="false" viewBox="0 0 24 24" aria-hidden="true" role="presentation"><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"></path></svg></span><span class="jss909"></span></button></div>
</li>
<li class="jss1724">
<div class="jss1723 jss1726 jss1731 jss1733">
<div theme="[object Object]" class="jss2740" style="position: relative; border: none; box-shadow: none; display: flex; justify-content: center; align-items: center; background: none;">
<div class="jss1039" title=""><span class="jss1049"><span class="jss1050 jss1037 jss1054"></span></span>
</div>
<div class="jss1056 jss2740" theme="[object Object]"><img alt="hs" src="https://res.cloudinary.com/gather-app/image/upload/a_0,c_crop,h_832,r_max,w_832,x_0,y_233/c_limit,f_auto,q_auto,w_80/v1/qa/user_provided/user_profile/169/meq7v2a7p7wfrpckamih" class="jss1058"></div>
</div>
<div class="jss1745 jss2739"><span class="jss133 jss142 jss1748">harinder singh</span>
<p class="jss133 jss141 jss166 jss1749">Invited by Aaron Aaronson</p>
</div>
</div>
<div class="jss2846"><button class="jss906 jss1028" tabindex="0" type="button" aria-label="More" aria-haspopup="true" aria-owns="card-options-menu"><span class="jss1033"><svg class="jss169 jss170" focusable="false" viewBox="0 0 24 24" aria-hidden="true" role="presentation"><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"></path></svg></span><span class="jss909"></span></button></div>
</li>
<li class="jss1724">
<div class="jss1723 jss1726 jss1731 jss1733">
<div theme="[object Object]" class="jss2740" style="position: relative; border: none; box-shadow: none; display: flex; justify-content: center; align-items: center; background: none;">
<div class="jss1039" title=""><span class="jss1049"><span class="jss1050 jss1037 jss1054"></span></span>
</div>
<div class="jss1056 jss1057 jss2740" theme="[object Object]">jd</div>
</div>
<div class="jss1745 jss2739"><span class="jss133 jss142 jss1748">john doe</span>
<p class="jss133 jss141 jss166 jss1749">Invited by Aaron Aaronson</p>
</div>
</div>
<div class="jss2846"><button class="jss906 jss1028" tabindex="0" type="button" aria-label="More" aria-haspopup="true" aria-owns="card-options-menu"><span class="jss1033"><svg class="jss169 jss170" focusable="false" viewBox="0 0 24 24" aria-hidden="true" role="presentation"><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"></path></svg></span><span class="jss909"></span></button></div>
</li>
<li class="jss1724">
<div class="jss1723 jss1726 jss1731 jss1733">
<div theme="[object Object]" class="jss2740" style="position: relative; border: none; box-shadow: none; display: flex; justify-content: center; align-items: center; background: none;">
<div class="jss1039" title=""><span class="jss1049"><span class="jss1050 jss1037 jss1054"></span></span>
</div>
<div class="jss1056 jss1057 jss2740" theme="[object Object]">MF</div>
</div>
<div class="jss1745 jss2739"><span class="jss133 jss142 jss1748">McDonald Franchise</span>
<p class="jss133 jss141 jss166 jss1749">Invited by john doe</p>
</div>
</div>
<div class="jss2846"><button class="jss906 jss1028" tabindex="0" type="button" aria-label="More" aria-haspopup="true" aria-owns="card-options-menu"><span class="jss1033"><svg class="jss169 jss170" focusable="false" viewBox="0 0 24 24" aria-hidden="true" role="presentation"><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"></path></svg></span><span class="jss909"></span></button></div>
</li>
<li class="jss1724">
<div class="jss1723 jss1726 jss1731 jss1733">
<div theme="[object Object]" class="jss2740" style="position: relative; border: none; box-shadow: none; display: flex; justify-content: center; align-items: center; background: none;">
<div class="jss1039" title=""><span class="jss1049"><span class="jss1050 jss1037 jss1054"></span></span>
</div>
<div class="jss1056 jss2740" theme="[object Object]"><img alt="SJ" src="https://res.cloudinary.com/gather-app/image/upload/c_limit,f_auto,q_auto,w_80/v1/qa/user_provided/user_profile/300/x5rkmkjoameevlj5zmof" class="jss1058"></div>
</div>
<div class="jss1745 jss2739"><span class="jss133 jss142 jss1748">Sally Jesse Jesse Rafael</span>
<p class="jss133 jss141 jss166 jss1749">Invited by Aaron Aaronson</p>
</div>
</div>
<div class="jss2846"><button class="jss906 jss1028" tabindex="0" type="button" aria-label="More" aria-haspopup="true" aria-owns="card-options-menu"><span class="jss1033"><svg class="jss169 jss170" focusable="false" viewBox="0 0 24 24" aria-hidden="true" role="presentation"><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"></path></svg></span><span class="jss909"></span></button></div>
</li>
<li class="jss1724">
<div class="jss1723 jss1726 jss1731 jss1733">
<div theme="[object Object]" class="jss2740" style="position: relative; border: none; box-shadow: none; display: flex; justify-content: center; align-items: center; background: none;">
<div class="jss1039" title=""><span class="jss1049"><span class="jss1050 jss1037 jss1054"></span></span>
</div>
<div class="jss1056 jss1057 jss2740" theme="[object Object]">SD</div>
</div>
<div class="jss1745 jss2739"><span class="jss133 jss142 jss1748">Super-Dave User</span>
<p class="jss133 jss141 jss166 jss1749">Invited by Aaron Aaronson</p>
</div>
</div>
<div class="jss2846"><button class="jss906 jss1028" tabindex="0" type="button" aria-label="More" aria-haspopup="true" aria-owns="card-options-menu"><span class="jss1033"><svg class="jss169 jss170" focusable="false" viewBox="0 0 24 24" aria-hidden="true" role="presentation"><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"></path></svg></span><span class="jss909"></span></button></div>
</li>
<li class="jss1724">
<div class="jss1723 jss1726 jss1731 jss1733">
<div theme="[object Object]" class="jss2740" style="position: relative; border: none; box-shadow: none; display: flex; justify-content: center; align-items: center; background: none;">
<div class="jss1039" title=""><span class="jss1049"><span class="jss1050 jss1037 jss1054"></span></span>
</div>
<div class="jss1056 jss1057 jss2740" theme="[object Object]">TF</div>
</div>
<div class="jss1745 jss2739"><span class="jss133 jss142 jss1748">Tester Fester</span>
<p class="jss133 jss141 jss166 jss1749">Invited by Aaron Aaronson</p>
</div>
</div>
<div class="jss2846"><button class="jss906 jss1028" tabindex="0" type="button" aria-label="More" aria-haspopup="true" aria-owns="card-options-menu"><span class="jss1033"><svg class="jss169 jss170" focusable="false" viewBox="0 0 24 24" aria-hidden="true" role="presentation"><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"></path></svg></span><span class="jss909"></span></button></div>
</li>
<li class="jss1724">
<div class="jss1723 jss1726 jss1731 jss1733">
<div theme="[object Object]" class="jss2740" style="position: relative; border: none; box-shadow: none; display: flex; justify-content: center; align-items: center; background: none;">
<div class="jss1039" title=""><span class="jss1049"><span class="jss1050 jss1037 jss1054"></span></span>
</div>
<div class="jss1056 jss1057 jss2740" theme="[object Object]">ZC</div>
</div>
<div class="jss1745 jss2739"><span class="jss133 jss142 jss1748">Zach Chatterton</span>
<p class="jss133 jss141 jss166 jss1749">Invited by Aaron Aaronson</p>
</div>
</div>
<div class="jss2846"><button class="jss906 jss1028" tabindex="0" type="button" aria-label="More" aria-haspopup="true" aria-owns="card-options-menu"><span class="jss1033"><svg class="jss169 jss170" focusable="false" viewBox="0 0 24 24" aria-hidden="true" role="presentation"><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"></path></svg></span><span class="jss909"></span></button></div>
</li>
</ul>
</li>

SVG Table "Collapse" on Retina vs. Non-retina Screens

I'm using data to render SVG-based tables and charts in the browser (using Snap.js). All appears fine on a non-retina screen, but when I move the browser window containing the table to a retina screen, the table moves outside of the parent container.
From what I can tell, this has to do with the display itself and how the browser communicates with it, not the CSS (I've tried using different position values for parent and child, to no avail…and it already works fine on non-retina).
Non-retina:
Table appears normal
Retina:
Table outside parent container
Sample SVG Markup:
<svg class="pond" width="800px" height="100%"><desc>Created with Snap</desc><defs></defs><g class="pond-container"><rect x="0" y="0" width="800px" height="100%" fill="#ffffff" stroke="rgba(0,0,0,0)" style="stroke-width: 0;" class="pond-container "></rect>
<g id="pond_widget_250" class="widget-translator widget-droppable" transform="matrix(1,0,0,1,478,330)"><g stroke="none" fill="rgba(0,0,0,0)" style="stroke-width: 0;" class="pond-widget widget-container pond-widget-group "><rect x="0" y="0" width="302" height="49" rx="0" ry="0" class="pond-widget pond-widget-rect "></rect></g><g id="pond_widget_251" class="widget-translator widget-droppable" transform="matrix(1,0,0,1,4,4)"><g stroke="#008eda" fill="#dbeffa" style="stroke-width: 1;" class="widget-container customized"><rect x="0" y="0" width="294" height="41" rx="0" ry="0" stroke="#008eda" fill="#dbeffa" style="stroke-width: 1px; stroke-dasharray: none;" class="pond-widget pond-widget-rect "></rect></g></g><g id="pond_widget_252" class="widget-translator " transform="matrix(1,0,0,1,70,20.0001)"><g stroke="#008eda" fill="#dbeffa" style="stroke-width: 1;" class="widget-container customized"><text x="0" y="0" stroke="none" fill="#008eda" style="stroke-width: 1px; stroke-dasharray: none; font-size: 14px; font-weight: 900; alignment-baseline: hanging; text-anchor: start;" class="pond-widget pond-widget-text ">Table Should Appear Below</text></g></g></g><g id="pond_widget_256" class="widget-translator " transform="matrix(1,0,0,1,481,403)"><g stroke="null" fill="rgba(0,0,0,0)" style="stroke-width: 1;" class="widget-container customized" id="table_255"><rect x="0" y="0" width="295" height="352.0000305175781" rx="0" ry="0" stroke="null" fill="rgba(0,0,0,0)" style="stroke-width: 1px; stroke-dasharray: none;" class="pond-widget pond-widget-rect "></rect>
<foreignObject width="295px" height="352.0000305175781px" style="
position: relative !important;
">
<div class="rt--view rt-table-view" xmlns="http://www.w3.org/1999/xhtml" style="left: 0;bottom: 0;" contentscalefactor="1.0">
<div class="grid-header" style="
float: none;
">
<span class="col col-0 equip_name cols-2">
<span>Equip Name</span>
</span>
<span class="col col-1 value cols-2">
<span>Value</span>
</span>
<!-- end for -->
</div>
<div class="grid-body" style="
float: none;
">
<div class="grid-row row-0">
<span class="col col-0 equip_name cols-2">
AC-03 2nd Flr South
</span>
<span class="col col-0 value cols-2">
37500
</span>
</div>
<div class="grid-row row-1">
<span class="col col-1 equip_name cols-2">
AC-06 Dining
</span>
<span class="col col-1 value cols-2">
31200
</span>
</div>
<div class="grid-row row-0">
<span class="col col-2 equip_name cols-2">
AC-01 1st Flr South
</span>
<span class="col col-2 value cols-2">
38700
</span>
</div>
<div class="grid-row row-1">
<span class="col col-3 equip_name cols-2">
AC-05 Tailor Shop
</span>
<span class="col col-3 value cols-2">
41100
</span>
</div>
<div class="grid-row row-0">
<span class="col col-4 equip_name cols-2">
AC-04 2nd Flr North
</span>
<span class="col col-4 value cols-2">
39600
</span>
</div>
<div class="grid-row row-1">
<span class="col col-5 equip_name cols-2">
AC-07 Kitchen
</span>
<span class="col col-5 value cols-2">
56100
</span>
</div>
<div class="grid-row row-0">
<span class="col col-6 equip_name cols-2">
AC-02 1st Flr North
</span>
<span class="col col-6 value cols-2">
39000
</span>
</div>
<div class="grid-row row-1">
<span class="col col-7 equip_name cols-2">
AC-08 MC Room
</span>
<span class="col col-7 value cols-2">
85500
</span>
</div>
<!-- hidden rows -->
<div class="hidden-rows-count">32 more row(s) hidden</div>
<!-- end if hidden -->
</div>
<!-- end if data.length -->
</div>
</foreignObject>
</g></g></g></svg>