Skip to content

Commit

Permalink
css container i18nlabel
Browse files Browse the repository at this point in the history
  • Loading branch information
gigamaster committed Nov 12, 2024
1 parent 1ddaa94 commit ee8c700
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/livecodes/UI/embed-ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ export default function App() {
nonEmbeddedUrl.searchParams.delete('lite');
const projectUrl = decodeURIComponent(nonEmbeddedUrl.href);
return `
<iframe title="${title}" scrolling="no" loading="lazy" style="height:300px; width: 100%; border:1px solid black; border-radius:4px;" src="${iframeUrl}">
<iframe title="${title}" scrolling="no" loading="lazy" style="height:300px; width: 100%; border:1px solid black; border-radius:6px;" src="${iframeUrl}">
See the project <a href="${projectUrl}" target="_blank">${title}</a> on <a href="${livecodesUrl}" target="_blank">LiveCodes</a>.
</iframe>
`.trimStart();
Expand Down
6 changes: 3 additions & 3 deletions src/livecodes/i18n/locales/ja/translation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ const translation: I18nTranslation = {
gist: 'GitHub Gistにエクスポート',
heading: 'エクスポート',
jsfiddle: 'JSFiddleで編集',
json: 'プロジェクトをエクスポート(JSON',
json: 'エクスポート (JSON)',
result: '結果をエクスポート(HTML)',
src: 'ソースをエクスポート(ZIP)',
},
Expand Down Expand Up @@ -644,7 +644,7 @@ const translation: I18nTranslation = {
savePrompt: {
heading: '未保存の変更',
prompt: {
cancel: 'キャンセル',
cancel: '消去',
discard: '保存しない',
heading: '変更が保存されていない可能性があります。<1></1>今すぐ保存しますか?',
save: '保存',
Expand Down Expand Up @@ -886,7 +886,7 @@ const translation: I18nTranslation = {
heading: '最近',
},
recover: {
cancel: 'キャンセル',
cancel: '消去',
heading: '復元',
lastModified: '最終更新: <1></1>',
recover: '復元',
Expand Down
20 changes: 16 additions & 4 deletions src/livecodes/styles/inc-menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
color: inherit;
display: inherit;
justify-content: space-between;
padding: var(--s6) var(--s8); // TODO css var rel to li height (fontsize+padding)
padding: var(--s6) var(--s8);
text-decoration: none;
white-space: nowrap;
width: 100%;
Expand Down Expand Up @@ -229,7 +229,7 @@
display: flex;
flex-grow: 1;
justify-content: space-between;
padding: 6px 8px; // TODO css var rel to li height (fontsize+padding)
padding: var(--s6) var(--s8);

input[type='range'] {
width: 8em;
Expand All @@ -256,7 +256,7 @@
position: absolute !important;
right: unset;
top: 0;
width: 230px; // todo css var + for font-size 14px
width: 234px;

&:hover {
display: block !important;
Expand Down Expand Up @@ -376,10 +376,22 @@ i.arrow {
}
}

label:has(span[data-i18n="menu.formatOnsave"], span[data-i18n="menu.recoverUnsaved"]) {
container: i18nlabel / inline-size; // Parent to set font-size based on size of container
white-space: nowrap;
}

@container i18nlabel (width < 236px) {
span {
font-size: 5.25cqi; // font-size based on size of container
}
}


.switch {
cursor: pointer;
display: inherit;
padding: 6px 8px; // TODO css var rel to li height (fontsize+padding)
padding: var(--s6) var(--s8);
width: 100%;

span {
Expand Down

0 comments on commit ee8c700

Please sign in to comment.