Skip to content

Commit e78f692

Browse files
authored
releases.jquery.com: make the SRI modal responsive (#445)
- the SRI modal now resizes with the window
1 parent 2e363c4 commit e78f692

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

themes/jquery/css/sri-modal.css

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,16 @@
22
* Added for SRI Modal
33
*/
44
.sri-modal {
5-
padding: 0;
5+
padding: 20px;
66
border: none;
77
background: #fff;
88
border-radius: 0;
9+
10+
/* Resize with window */
11+
width: calc(100% - 40px) !important;
12+
max-width: 830px;
13+
left: 50% !important;
14+
transform: translateX(-50%);
915
}
1016

1117
.sri-modal .ui-dialog-titlebar {
@@ -17,7 +23,6 @@
1723
}
1824

1925
.sri-modal .ui-dialog-title {
20-
padding-top: 20px;
2126
text-align: center;
2227
font-family: "klavika-web", "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
2328
font-weight: 400;
@@ -43,23 +48,23 @@
4348
}
4449

4550
.sri-modal-link {
46-
width: 810px;
51+
width: 100%;
4752
word-wrap: break-word;
4853
word-break: break-all;
4954
display: inline-block;
5055
background-color: #f8fbfb;
51-
padding: 0 10px;
56+
/* Leave room for button */
57+
padding: 10px 45px 10px 10px;
5258
position: relative;
5359
}
5460

5561
.sri-modal-link code {
56-
width: 765px;
5762
display: inline-block;
5863
white-space: pre-line;
5964
background-color: transparent;
60-
padding: 0;
6165
font-size: 13px;
6266
line-height: 16px;
67+
padding: 0;
6368
}
6469

6570
.sri-modal-copy-btn {
@@ -71,6 +76,7 @@
7176
cursor: pointer;
7277
position: absolute;
7378
top: 5px;
79+
right: 0;
7480
}
7581

7682
.sri-modal-copy-btn > i {

themes/jquery/js/sri-modal.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ $( function() {
1414
} ) ).removeAttr( "id" ).appendTo( "body" ).dialog( {
1515
modal: true,
1616
resizable: false,
17-
width: 830,
1817
dialogClass: "sri-modal",
1918
draggable: false,
2019
close: function() {

0 commit comments

Comments
 (0)