Skip to content

Commit 89839bf

Browse files
author
minjk-bl
committed
Add rendered_html style for vp
1 parent a52e8a3 commit 89839bf

File tree

6 files changed

+60
-4
lines changed

6 files changed

+60
-4
lines changed

visualpython/css/component/popupComponent.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,10 @@
446446
height: calc(100% - 70px);
447447
padding: 10px;
448448
}
449+
.vp-inner-popup-body table th {
450+
text-align: left;
451+
font-weight: unset;
452+
}
449453
.vp-inner-popup-button-box {
450454
float: right;
451455
margin: 0 10px 10px 0;

visualpython/css/root.css

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,58 @@ hr.vp-extra-menu-line {
678678
.vp-option-horizontal-table-layout .vp-center-align {
679679
text-align: center;
680680
}
681+
/* rendered table style */
682+
.vp_rendered_html * + table {
683+
margin-top: 1em;
684+
}
685+
.vp_rendered_html table {
686+
margin-left: auto;
687+
margin-right: auto;
688+
border: none;
689+
border-collapse: collapse;
690+
border-spacing: 0;
691+
color: black;
692+
font-size: 12px;
693+
table-layout: fixed;
694+
}
695+
.vp_rendered_html thead {
696+
border-bottom: 1px solid black;
697+
vertical-align: bottom;
698+
}
699+
.vp_rendered_html tr, .vp_rendered_html th, .vp_rendered_html td {
700+
text-align: right;
701+
vertical-align: middle;
702+
padding: 0.5em 0.5em;
703+
line-height: normal;
704+
white-space: normal;
705+
max-width: none;
706+
border: none;
707+
}
708+
.vp_rendered_html th {
709+
font-weight: bold;
710+
}
711+
.vp_rendered_html tbody tr:nth-child(odd) {
712+
background: #f5f5f5;
713+
}
714+
.vp_rendered_html tbody tr:hover {
715+
background: rgba(66, 165, 245, 0.2);
716+
}
717+
.vp_rendered_html * + p {
718+
margin-top: 1em;
719+
}
720+
.vp_rendered_html p {
721+
text-align: left;
722+
}
723+
.vp_rendered_html pre, .vp_rendered_html code {
724+
border: 0;
725+
color: #000;
726+
font-size: 100%;
727+
}
728+
.vp_rendered_html pre {
729+
margin: 1em 2em;
730+
padding: 0px;
731+
background-color: #fff;
732+
}
681733
/* jquery auto-complete */
682734
.ui-autocomplete {
683735
z-index: 1250;

visualpython/html/m_apps/instance.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<span class="vp-instance-preview-title">Instance Preview</span>
2323
</div>
2424
<div class="vp-instance-preview-box vp-grid-border-box">
25-
<div id="instancePreview" class="vp-instance-preview-content rendered_html vp-center vp-scrollbar"></div>
25+
<div id="instancePreview" class="vp-instance-preview-content vp_rendered_html vp-center vp-scrollbar"></div>
2626
</div>
2727
</div>
2828
</div>

visualpython/html/m_apps/variable.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@
3434
</div>
3535
<hr/>
3636
<strong><span class="vp-multilang" data-caption-id="varDetailValue">Variable Detail</span></strong>
37-
<div id="vp_varDetailTable" class="rendered_html vp-scrollbar"></div>
37+
<div id="vp_varDetailTable" class="vp_rendered_html vp-scrollbar"></div>
3838
</body>

visualpython/js/m_apps/Groupby.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ define([
514514

515515
renderDataPage(renderedText, isHtml = true) {
516516
var tag = new com_String();
517-
tag.appendFormatLine('<div class="{0} vp-close-on-blur vp-scrollbar">', 'rendered_html'); // 'rendered_html' style from jupyter output area
517+
tag.appendFormatLine('<div class="{0} vp-close-on-blur vp-scrollbar">', 'vp_rendered_html'); // 'rendered_html' style from jupyter output area
518518
if (isHtml) {
519519
tag.appendLine(renderedText);
520520
} else {

visualpython/js/m_apps/Subset.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ define([
162162
VP_DS_DATA_VIEW_ALL_DIV, VP_DS_DATA_VIEW_ALL, (this.state.viewAll?'checked':''), "view all");
163163
// data view
164164
tag.appendFormatLine('<div class="{0} {1} vp-scrollbar"></div>', VP_DS_DATA_VIEW_BOX,
165-
'rendered_html'); // 'rendered_html' style from jupyter output area
165+
'vp_rendered_html'); // 'rendered_html' style from jupyter output area
166166
return tag.toString();
167167
}
168168
getAllowSubsetTypes() {

0 commit comments

Comments
 (0)