Open evandrocoan opened 4 years ago
Scroll bars cannot be enabled inside phantoms.
import sublime import sublime_plugin class EventListener(sublime_plugin.EventListener): def on_selection_modified(self, view): HTML_TEMPLATE = """ <body id="line-annotation"> <style> html, body { overflow: scroll; height: 150px; } </style> Hi. <br> Hi. <br> Hi. <br> Hi. <br> Hi. <br> Hi. <br> Hi. <br> Hi. <br> Hi. <br> Hi. <br> Hi. <br> Hi. <br> Hi. <br> Hi. <br> Hi. <br> Hi. <br> Hi. <br> Hi. <br> </body> """ point = view.line(view.sel()[0]).end() view.erase_phantoms('line_annotation') view.add_phantom( 'line_annotation', sublime.Region(point, point + 1), HTML_TEMPLATE, sublime.LAYOUT_INLINE )
After 150px of height, scroll bars should appear.
150px
Scroll bars never appear.
10 build 15063 x64
1920x1080
1.0
3207
Related:
Currently neither overflow nor height are part of minihtml - https://www.sublimetext.com/docs/minihtml.html#css.
overflow
height
Description
Scroll bars cannot be enabled inside phantoms.
Steps to reproduce
Expected behavior
After
150px
of height, scroll bars should appear.Actual behavior
Scroll bars never appear.
Environment
10 build 15063 x64
1920x1080
1.0
3207
Related: