<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Referring to the visual's iframe element from CSS in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Referring-to-the-visual-s-iframe-element-from-CSS/m-p/235914#M7428</link>
    <description>&lt;P&gt;This issue is related to the fact that PBIVIZ tools encapsulate CSS by including GUID of the visual as a prefix for all of selectors.&lt;/P&gt;&lt;P&gt;Our recommendation is to include an extra DOM element and apply styles to this element.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Ignat Vilesov&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;Software Engineer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;pbicvsupport@microsoft.com&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 22 Aug 2017 08:28:18 GMT</pubDate>
    <dc:creator>v-viig</dc:creator>
    <dc:date>2017-08-22T08:28:18Z</dc:date>
    <item>
      <title>Referring to the visual's iframe element from CSS</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Referring-to-the-visual-s-iframe-element-from-CSS/m-p/235389#M7418</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to do this? For example to set the background of my visual, I've tried the following:&lt;/P&gt;&lt;PRE&gt;#sandbox-host{&lt;BR /&gt;    background:black;&lt;BR /&gt;}&lt;/PRE&gt;&lt;P&gt;but it has no effect.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Strangely enough, in the visual's TypeScript I can set it with d3 like&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;d3.select(this.host).style("background", "black");&lt;/PRE&gt;&lt;P&gt;so it is possible to style it, just not via pure CSS it seems.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I doing something wrong?&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2017 16:07:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Referring-to-the-visual-s-iframe-element-from-CSS/m-p/235389#M7418</guid>
      <dc:creator>callum</dc:creator>
      <dc:date>2017-08-21T16:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: Referring to the visual's iframe element from CSS</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Referring-to-the-visual-s-iframe-element-from-CSS/m-p/235391#M7419</link>
      <description>&lt;P&gt;I've just discovered that it's even possible to set it via d3 with&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;d3.select("#sandbox-host").style("background", "black");&lt;/PRE&gt;&lt;P&gt;so it can't be an issue with the syntax or spelling of the selector I'm using...&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2017 16:09:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Referring-to-the-visual-s-iframe-element-from-CSS/m-p/235391#M7419</guid>
      <dc:creator>callum</dc:creator>
      <dc:date>2017-08-21T16:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: Referring to the visual's iframe element from CSS</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Referring-to-the-visual-s-iframe-element-from-CSS/m-p/235914#M7428</link>
      <description>&lt;P&gt;This issue is related to the fact that PBIVIZ tools encapsulate CSS by including GUID of the visual as a prefix for all of selectors.&lt;/P&gt;&lt;P&gt;Our recommendation is to include an extra DOM element and apply styles to this element.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Ignat Vilesov&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;Software Engineer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;pbicvsupport@microsoft.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2017 08:28:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Referring-to-the-visual-s-iframe-element-from-CSS/m-p/235914#M7428</guid>
      <dc:creator>v-viig</dc:creator>
      <dc:date>2017-08-22T08:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: Referring to the visual's iframe element from CSS</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Referring-to-the-visual-s-iframe-element-from-CSS/m-p/396550#M11804</link>
      <description>&lt;DIV&gt;&lt;SPAN&gt;You can create one svg element or any div element as below:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;inside constructor:&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;let svg = this.svg = d3.select(options.element).append('svg').classed("svg-content",true);&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;inside visual.less file:&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;.svg-content&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;background-color&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;black&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Sun, 15 Apr 2018 05:28:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Referring-to-the-visual-s-iframe-element-from-CSS/m-p/396550#M11804</guid>
      <dc:creator>mehul2010</dc:creator>
      <dc:date>2018-04-15T05:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: Referring to the visual's iframe element from CSS</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Referring-to-the-visual-s-iframe-element-from-CSS/m-p/396551#M11805</link>
      <description>&lt;P&gt;&lt;STRONG&gt;inside constructor make&amp;nbsp;one HTML element as below:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;let&lt;/SPAN&gt; &lt;SPAN&gt;svg&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;svg&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;d3&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;select&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;options&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;element&lt;/SPAN&gt;&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;SPAN&gt;append&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'svg'&lt;/SPAN&gt;&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;SPAN&gt;classed&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"svg-content"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;true&lt;/SPAN&gt;&lt;SPAN&gt;); &lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;inside visual.less file add,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;.svg-content&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;background-color&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;black&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 15 Apr 2018 05:31:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Referring-to-the-visual-s-iframe-element-from-CSS/m-p/396551#M11805</guid>
      <dc:creator>mehul2010</dc:creator>
      <dc:date>2018-04-15T05:31:05Z</dc:date>
    </item>
  </channel>
</rss>

