Giter Club home page Giter Club logo

colosseum's Introduction

https://beeware.org/static/images/defaultlogo.png

Colosseum

Build Status Discord server

An independent implementation of the CSS layout algorithm. This implementation is completely standalone - it isn't dependent on a browser, and can be run over any box-like set of objects that need to be laid out on a page (either physical or virtual)

Tutorial

Want to jump in and get started? We have a hands-on tutorial for beginners

How-to guides

Looking for guidance on how to solve a specific problems? We have how-to guides and recipes for common problems and tasks, including how to contribute.

Reference

Just want the raw technical details? Here's our Technical reference.

Background

Looking for explanations and discussion of key topics and concepts? Our background guides may help.

Community

Colosseum is part of the BeeWare suite. You can talk to the community through:

We foster a welcoming and respectful community as described in our BeeWare Community Code of Conduct.

Contributing

If you experience problems with Colosseum, log them on GitHub. If you want to contribute code, please fork the code and submit a pull request.

colosseum's People

Contributors

anshul-raman avatar daisylb avatar danyeaw avatar daonb avatar dependabot[bot] avatar dgmouris avatar drewdolan avatar dtcancode avatar fanninpm avatar fractional-ray avatar freakboy3742 avatar glasnt avatar goanpeca avatar hkdeven avatar jacebrowning avatar jonboland avatar kevinbowrin avatar mao-liu avatar mhsmith avatar newbazz avatar nixant avatar soccerdroid avatar strawstack avatar sypai avatar therealphildini avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

colosseum's Issues

Outdated Release Version of Colosseum on PyPi

Issue

The tutorial contains code that does not work on the current release of colosseum.

Steps to Reproduce

  1. Run pip install colosseum
  2. Start Python interpreter
  3. Run from colosseum.dimensions import Size, Box
  4. Observe error message ModuleNotFoundError: No module named 'colosseum.dimensions'

The current release version of colosseum does not contains the dimensions module. See release history.

Related Screenshot

Screen Shot 2019-05-06 at 11 15 32 AM

Colosseum width-014.json reference file wrong?

The Width-014 test for Colosseum creates a div of 1" height (which comes out to 96 px) by 1 px width, as seen here:

http://test.csswg.org/suites/css21_dev/nightly-unstable/html4/width-014.htm

The reference file for this test (colosseum/tests/web_platform/CSS2/normal_flow/ref/width-014.json) specifies it as 1.328125 px by 96 px.

This appears to be an incomplete reference file. The data file does return the correct value, but as the reference is incorrect, the test shows as failing.

...and in the event that I went about this all wrong and said something obvious or silly, do forgive me as I'm new and have no idea what I'm doing.

MyDOMNode Attribute is not Initialized

Issue

The following code, shown below, from this tutorial returns <Box (0x0 @ 0,0)> rather than what is expected: <Box (1000x1000 @ 0,0)>

Steps to Reproduce

Run the following lines of code as outlined in this tutorial:

>>> from colosseum import CSS
>>> node = MyDOMNode(style=CSS(width=1000, height=1000))
>>> layout = node.layout
>>> print(node.layout)

The response from print(node.layout) reveals that the width passed to the CSS object is not used by the resulting MyDOMNode object.

Split choices code from constants

It feels like we should split the constants in a separate module just for that and the choices on another one.

This could lead to removing some circular imports and make the modules much more specific.

Technical reference page is lists is empty

Describe the bug
The README points to the Technical reference but it is is essentially empty. It states "This is the technical reference for public APIs provided by Colosseum.".

To Reproduce
Steps to reproduce the behavior:

  1. Go to the Technical reference.
  2. See lack of content.

Expected behavior
A list of classes and functions.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment:

  • Software versions:
    • Browser: Firefox 9.3 (64-bit).

Can't add child if display=BLOCK

It looks like you can't add a node as a child of another node if the parent node has a display=BLOCK style.

from colosseum.constants import BLOCK
from colosseum.engine import layout
from colosseum import CSS
from tests.utils import TestNode, Display

root = TestNode(style=CSS(display=BLOCK), children=[TestNode()])
display = Display(dpi=96, width=1024, height=768)
layout(display, root)

Traceback (most recent call last):
File "test_box.py", line 25, in
layout(display, root)
File "/Users/mulka/Documents/Code/colosseum/colosseum/colosseum/engine.py", line 85, in layout
layout_box(display, node, containing_block, containing_block, font)
File "/Users/mulka/Documents/Code/colosseum/colosseum/colosseum/engine.py", line 234, in layout_box
calculate_height_and_margins(node, vertical)
File "/Users/mulka/Documents/Code/colosseum/colosseum/colosseum/engine.py", line 523, in calculate_height_and_margins
calculate_block_non_replaced_normal_flow_height(node, context)
File "/Users/mulka/Documents/Code/colosseum/colosseum/colosseum/engine.py", line 578, in calculate_block_non_replaced_normal_flow_height
content_height = last_child.layout.border_box_bottom
File "/Users/mulka/Documents/Code/colosseum/colosseum/colosseum/dimensions.py", line 393, in border_box_bottom
+ self.border_bottom_width
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'

More information on errors

After going through the how to contribute pages, and taking all the different steps I eventually get an error with the actual running of the test rather than a failed test. Is there any more documentation on where to look to fix these kinds of errors with tests?

This is my first time trying to contribute to open source, so if this is the wrong place to put this let me know, thanks for any help!

Priority list of CSS tests

I think there should be a list of which CSS tests are higher priority to fix. Which ones are easy to fix? Which ones should we support? Which ones can wait?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.