Wails: Support for custom scrollbars

Created on 31 Jul 2020  路  2Comments  路  Source: wailsapp/wails

Description
Unable to make custom scrollbars for a windows application using -webkit-

To Reproduce

  1. Run wails init and create an application using React for the frontend.
  2. Run npm install node-sass --save inside the frontend directory to support scss stylesheet.
  3. Make use of the following functional component along with custom stylesheet (scss) attached.
  4. Feel free to move the stylesheet in a separate file and then import inside the functional component.
function App() {
  let data = {
    test: "test test test",
    test2: "test2 test2 test2",
  };
  return (
    <div id="app" className="App">
      <div className="main-container">
        <Row>
          <Col className="main-columns"></Col>
          <Col xs={6} className="main-columns"></Col>
          <Col className="main-columns response-area">
            <pre>{JSON.stringify(data, null, 2)}</pre>
          </Col>
        </Row>
      </div>
    </div>
  );
}
.response-area {
      ::-webkit-scrollbar {
        background: grey;
        border-radius: 20px;
        height: 7px;
      }
      ::-webkit-scrollbar-track {
        background: grey;
        border-radius: 20px;
      }
      ::-webkit-scrollbar-thumb {
        background-color: yellowgreen;
        border-radius: 20px;
      }
      ::-webkit-scrollbar-thumb:hover {
        background-color: greenyellow;
        border-radius: 20px;
      }
 }

Expected behaviour
A custom scrollbar should appear in the windows application.

System Details
Windows 10
Go 1.14.2 windows/amd64
React: 16.13.0

bug

Most helpful comment

Try to adjust your code for IE 11 and test it on IE11 for Windows apps.

All 2 comments

Try to adjust your code for IE 11 and test it on IE11 for Windows apps.

That worked @ilgityildirim , thanks!!

Was this page helpful?
0 / 5 - 0 ratings