File tree Expand file tree Collapse file tree 4 files changed +73
-2
lines changed
Expand file tree Collapse file tree 4 files changed +73
-2
lines changed Original file line number Diff line number Diff line change @@ -202,7 +202,7 @@ <h2 class="text-delta">Table of contents</h2>
202202 < script src ="/assets/js/clipboard.min.js "> </ script >
203203 < script >
204204 document . addEventListener ( 'DOMContentLoaded' , function ( ) {
205- document . querySelectorAll ( '.highlight' ) . forEach ( function ( block ) {
205+ document . querySelectorAll ( 'div .highlight' ) . forEach ( function ( block ) {
206206 var btn = document . createElement ( 'button' ) ;
207207 btn . className = 'copy-btn' ;
208208 btn . textContent = 'Copy' ;
Original file line number Diff line number Diff line change @@ -298,6 +298,10 @@ img {
298298 flex : 1 ;
299299 min-width : 0 ;
300300 max-width : 750px ;
301+
302+ @media (max-width : 800px ) {
303+ max-width : 100% ;
304+ }
301305}
302306
303307.toc-sidebar {
@@ -604,3 +608,53 @@ p.text-delta + ul#markdown-toc {
604608 }
605609}
606610
611+ // =============================================================================
612+ // Mobile Responsive Fixes
613+ // =============================================================================
614+
615+ @media (max-width : 900px ) {
616+ // Fix horizontal overflow on mobile
617+ .main {
618+ max-width : 100% !important ;
619+ width : 100% ;
620+ overflow-x : hidden ;
621+ }
622+
623+ .main-content-wrap {
624+ max-width : 100% !important ;
625+ padding-left : 15px ;
626+ padding-right : 15px ;
627+ }
628+
629+ .content-with-toc {
630+ max-width : 100% ;
631+ }
632+
633+ .main-content table {
634+ display : block ;
635+ overflow-x : auto ;
636+ -webkit-overflow-scrolling : touch ;
637+ max-width : 100% ;
638+ }
639+
640+ // Code blocks on mobile - ensure they stay within container and scroll
641+ div .highlight {
642+ max-width : 100% ;
643+ overflow-x : auto ;
644+ -webkit-overflow-scrolling : touch ;
645+
646+ pre {
647+ max-width : 100% ;
648+ }
649+
650+ code {
651+ white-space : pre ;
652+ }
653+ }
654+
655+ // Hide copy button on mobile
656+ .copy-btn {
657+ display : none !important ;
658+ }
659+ }
660+
Original file line number Diff line number Diff line change @@ -267,3 +267,20 @@ pre code {
267267 background : # 585b70 ;
268268}
269269
270+ /* Mobile Responsive Styles */
271+ @media (max-width : 800px ) {
272+ /* Hide copy button on mobile (no hover on touch devices) */
273+ .copy-btn {
274+ display : none;
275+ }
276+
277+ /* Fix code block overflow */
278+ .highlight {
279+ max-width : 100% ;
280+ }
281+
282+ .highlight pre {
283+ max-width : 100% ;
284+ }
285+ }
286+
Original file line number Diff line number Diff line change 11---
22layout : page
3- title : API Reference - HTML/CSS to Image
3+ title : Using the API
44permalink : /getting-started/using-the-api/
55parent : Getting started
66nav_order : 1
You can’t perform that action at this time.
0 commit comments