Ok it works now.
Now I want to ask about the CSS vs SCSS. Are the properties in the codepen css or scss? I wonder if the syntax($,/,%) is germaine to scss and is not pure css.Can you convert scss to pure css properies?
Can you explain the grid template repeat property, how do you get these values and is this pure css? Do these values(of the grid template repeat property) change for each puzzle or stay the same?
Other examples with syntax($,/,%): $color-valid-item,all properties with $ sign in front, % sign and / in grid-template repeat and the (crossword -item-size * crossword-column/row-count), does this remain the same?
I guess Im trying to say is this pure css or scss syntax and would it be better to use css syntax?
I wasn’t the person that made the SCSS code in the CSS-Only Crossword. The people in the HTML+CSS area can explain about SCSS far better than me.
In fact, I’ll help out and move these posts over there.
I know nothing about SCSS, but in CodePen, you an view the compiled CSS by selecting the SCSS/CSS dropdown and choosing View Compiled CSS.
What room covers the topic, converting scss to css. The codepen says css but some of the syntax is scss.
For reference, a link to the CSS-Only Crossword code is https://codepen.io/adrianroworth/pen/OpeyZq
I was just looking on internet, it seem scss properties will work with this code. Do you think it will work?
You can only use SCSS if you have set up your environment to use it as SCSS is a preprocessor and the SCSS is then compiled into normal CSS. Browsers don’t understand SCSS at all.
If you look at the codepen and then choose ‘View compiled CSS’ you will see the real CSS that the browser will use. SCSS allows you to do things that CSS can’t such as looping through code and applying incremental variables when you have repetitive constructs such as those used in the crossword example.
Personally I don’t use a preprocessor as I rarely see a benefit (unless creating a convoluted demo) but a lot of users will swear by it. In the end I hate anything getting between me and my CSS.
As Paul said, it’s basically preference how you code. Some people find it faster/better . There are definitely advantages and disadvantages to it. If it’s something you have set up already, and there’s no real “setup” work you need to make SCSS work, then I say go for that, but it just compiles into CSS so it’s not the end of the world to just code in straight CSS.
I was against SCSS but these past few years have changed my view on it. Since it’s set up on my machine and I know how to easily use/compile the code, it’s been great. But I could see how for someone, with a small project, who doesn’t have it set up…it might be too much, or not worth it, to go through with using SCSS.
$color-focus-item: FFF74 is the declared variable
When you want to use later in the code as a background, what is the proper syntax
background: #FFF74 or $color-focus-item;
You can use either, but the variable name is the preferred one to use as that makes later modifications easier to achieve.
I think I messed up. I lost the active focus box, the one that moves when you enter a letter. I used the following code and the yellow active square is not there. Can you help?
border: 1px solid #000000;
outline: 1px solid #000000;focus
think I messed up. I lost the active yellow focus square. When I click a square the background isn’t yellow,however the cursor will move with the arrow. How can I get the active square back to yellow?
Also the clues hover yellow; they do not turn green when right, but the answer on the grid does.
Fortunately you have the codePen that gives you the original CSS code. You can use that to undo the damage you have done.
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.