mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Add support for requiring a platform-specific stylesheet
Add a getPlatform method to the native object that is used for requiring the platform stylesheet from within window.coffee after the atom.css is required. This is used to provide non-native scrollbars on Linux for an improved look and feel.
This commit is contained in:
@@ -56,6 +56,7 @@ windowAdditions =
|
||||
|
||||
requireStylesheet: (path) ->
|
||||
fullPath = require.resolve(path)
|
||||
return unless fs.isFile(fullPath)
|
||||
window.applyStylesheet(fullPath, fs.read(fullPath))
|
||||
|
||||
applyStylesheet: (id, text) ->
|
||||
@@ -106,3 +107,4 @@ require 'underscore-extensions'
|
||||
|
||||
requireStylesheet 'reset.css'
|
||||
requireStylesheet 'atom.css'
|
||||
requireStylesheet "#{$native.getPlatform()}.css"
|
||||
|
||||
Reference in New Issue
Block a user