Skip to content

Commit 00606e5

Browse files
author
Daniel Jacinto
authored
[Ally Bug] Remove table layout from installation commands. (#9058)
1 parent 5e1aeab commit 00606e5

3 files changed

Lines changed: 27 additions & 40 deletions

File tree

src/Bootstrap/dist/css/bootstrap-theme.css

Lines changed: 8 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Bootstrap/less/theme/page-display-package.less

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -370,23 +370,18 @@
370370

371371
.tab-content {
372372
.tab-pane {
373-
> div {
374-
display: table;
375-
height: 1px;
376-
}
377-
373+
378374
.install-script-row {
379-
display: table-row;
375+
display: flex;
380376
height: 100%;
377+
width: 100%;
381378

382379
.install-script {
383-
display: table-cell;
384380
background-color: @panel-footer-bg;
385381
font-family: @font-family-monospace;
386382
font-size: 1em;
387383
color: #fff;
388-
width: 100%;
389-
max-width: 1px;
384+
width: calc(100% - 40px);
390385
line-height: 1.5;
391386
white-space: pre-wrap;
392387
// Add a border with the same color as the background to support visual callout
@@ -396,16 +391,13 @@
396391
border-width: 1px 0 1px 1px;
397392
vertical-align: middle;
398393
word-break: break-word;
394+
margin: 0px;
399395
}
400396

401-
.copy-button {
402-
height: 100%;
403-
404-
button {
397+
.copy-button button {
405398
height: 100%;
406399
min-height: 42px;
407400
line-height: 1.5;
408-
}
409401
}
410402
}
411403

src/NuGetGallery/Views/Packages/DisplayPackage.cshtml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -180,21 +180,19 @@
180180
{
181181
var thirdPartyPackageManager = packageManager as ThirdPartyPackageManagerViewModel;
182182
<div role="tabpanel" class="tab-pane @(active ? "active" : string.Empty)" id="@packageManager.Id">
183-
<div>
184-
<div class="install-script-row">
185-
@{
186-
var lastIndex = packageManager.InstallPackageCommands.Length - 1;
187-
var cs = packageManager.InstallPackageCommands.Select((c, i) => i < lastIndex ? c + Environment.NewLine : c);
188-
}
189-
@* Writing out the install command must be on a single line to avoid undesired whitespace in the <pre> tag. *@
190-
<pre class="install-script" id="@packageManager.Id-text">@foreach (var c in cs) {<span class="install-command-row">@c</span>}</pre>
191-
<div class="copy-button">
192-
<button id="@packageManager.Id-button" class="btn btn-default btn-warning" type="button"
193-
data-toggle="popover" data-placement="bottom" data-content="Copied."
194-
aria-label="@packageManager.CopyLabel" role="button">
195-
<span class="ms-Icon ms-Icon--Copy" aria-hidden="true"></span>
196-
</button>
197-
</div>
183+
<div class="install-script-row">
184+
@{
185+
var lastIndex = packageManager.InstallPackageCommands.Length - 1;
186+
var cs = packageManager.InstallPackageCommands.Select((c, i) => i < lastIndex ? c + Environment.NewLine : c);
187+
}
188+
@* Writing out the install command must be on a single line to avoid undesired whitespace in the <pre> tag. *@
189+
<pre class="install-script" id="@packageManager.Id-text">@foreach (var c in cs) {<span class="install-command-row">@c</span>}</pre>
190+
<div class="copy-button">
191+
<button id="@packageManager.Id-button" class="btn btn-default btn-warning" type="button"
192+
data-toggle="popover" data-placement="bottom" data-content="Copied."
193+
aria-label="@packageManager.CopyLabel" role="button">
194+
<span class="ms-Icon ms-Icon--Copy" aria-hidden="true"></span>
195+
</button>
198196
</div>
199197
</div>
200198

0 commit comments

Comments
 (0)