Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Font size option #66

Open
russellcameronthomas opened this issue Nov 5, 2016 · 1 comment
Open

Font size option #66

russellcameronthomas opened this issue Nov 5, 2016 · 1 comment

Comments

@russellcameronthomas
Copy link

russellcameronthomas commented Nov 5, 2016

It would be great if there was a simple font size option, or some way to inherit from a parent.

Ideally, I'd like to see this:

<div class="resize">
<script type="text/p5"> 
function setup() {
       createCanvas(100, 100);
}
function draw() {
    background(255, 0, 200);
}
 </script>
</div>

where ".resize" has font-size: 80%; set in my main css file (as default, plus several user-selectable font sizes).

But I'm open to other approaches.

Right now, I can't find any way to change the font size in the editor. I tried this in CSS but it didn't work:

.CodeMirror.cm-s-p5-widget {
   font-size: 80%;
}

However, this does work when I manually add the attribute font-size: 80%; in <div class="CodeMirror cm-s-p5-widget"> in Developer mode in the browser.

(I can't set font-size for the generic .CodeMirror because I have other uses for it.)

@russellcameronthomas
Copy link
Author

You can lower the priority of this request. I cloned the project and modified the CSS to get the font size that I need. It's not variable, but at least the fixed size is better for my site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant